First published: Wed Mar 12 2025(Updated: )
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/678dcbc9.050a0220.303755.0066.GAE@google.com/
Credit: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Affected Software | Affected Version | How to fix |
---|---|---|
Linux Kernel | ||
Linux Kernel | >=5.5<6.6.80 | |
Linux Kernel | >=6.7<6.12.17 | |
Linux Kernel | >=6.13<6.13.5 | |
Linux Kernel | =6.14-rc1 | |
Linux Kernel | =6.14-rc2 | |
Linux Kernel | =6.14-rc3 |
Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.
CVE-2025-21853 has been classified as having a moderate severity level.
To fix CVE-2025-21853, update your Linux kernel to the latest version that addresses this vulnerability.
CVE-2025-21853 may allow for race conditions during memory mapping of BPF map contents, potentially leading to information leakage or system instability.
CVE-2025-21853 affects certain versions of the Linux kernel prior to the patch being applied.
CVE-2025-21853 involves an issue with the freeze_mutex during mmap operations in BPF, leading to potential race conditions.