CVE-2025-21853

bpf: avoid holding freeze_mutex during mmap operation

MEDIUM
5.5
CVSS Score
Published: March 12, 2025 at 09:42 AM UTC
Updated: October 15, 2026 at 02:17 AM UTC
4 products affected across 2 vendorsLinux KernelSIMATIC S7-1500 CPU 1518-4 Pn /dp MFP FirmwareSiplus S7-1500 CPU 1518-4 Pn /dp MFP Firmware

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM5.5
Exploit prediction
EPSS 0.2%

Description

In the Linux kernel, the following vulnerability has been resolved: bpf: avoid holding freeze_mutex during mmap operation We use map->freeze_mutex to prevent races between map_freeze() and memory mapping BPF map contents with writable permissions. The way we naively do this means we'll hold freeze_mutex for entire duration of all the mm and VMA manipulations, which is completely unnecessary. This can potentially also lead to deadlocks, as reported by syzbot in [0]. So, instead, hold freeze_mutex only during writeability checks, bump (proactively) "write active" count for the map, unlock the mutex and proceed with mmap logic. And only if something went wrong during mmap logic, then undo that "write active" counter increment. [0] https://lore.kernel.org/bpf/[email protected]/

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

5.5 ≤ v < 6.6.806.13 ≤ v < 6.13.56.7 ≤ v < 6.12.176.146.14 rc16.14 rc26.14 rc3fc9702273e2edb90400a34b3be76f7b08fa3344b
Vendor states this is fixed in 0d90d9e154144a3a80e9fc0eb9b21b7fc990f68f (fixed)
Vendor states this is fixed in 271e49f8a58edba65bc2b1250a0abaa98c4bfdbe (fixed)
Vendor states this is fixed in 29cfda62ab4d92ab94123813db49ab76c1e61b29 (fixed)
Vendor states this is fixed in 2ce31c97c219b4fe797749f950274f246eb88c49 (fixed)
Vendor states this is fixed in 4759acbd44d24a69b7b14848012ec4201d6c5501 (fixed)
Vendor states this is fixed in bc27c52eea189e8f7492d40739b7746d67b65beb (fixed)
Vendor states this is fixed in d95607a5f2f9bb08194c9deaf4a5f3e8ba59a9d4 (fixed)
Vendor states this is fixed in 5.10.237 (unaffected)
Vendor states this is fixed in 5.15.181 (unaffected)
Vendor states this is fixed in 5.5 (unaffected)
Vendor states this is fixed in 6.1.135 (unaffected)
Vendor states this is fixed in 6.12.17 (unaffected)
Vendor states this is fixed in 6.13.5 (unaffected)
Vendor states this is fixed in 6.14 (unaffected)
Vendor states this is fixed in 6.6.80 (unaffected)

References (11)

CVSS

Attack Vector
LOCAL
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
NONE
Availability
HIGH
Vector?

Quick Info

StatusMODIFIED
CWE
NVD-CWE-noinfo

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card