CVE-2025-21853: bpf: avoid holding freeze_mutex during mmap operation

Published Mar 12, 2025
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

bpf: avoid holding freezemutex during mmap operation

We use map->freezemutex to prevent races between mapfreeze() and memory mapping BPF map contents with writable permissions. The way we naively do this means we'll hold freezemutex 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 freezemutex 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/

Other sources

In the Linux kernel, the following vulnerability has been resolved:

bpf: avoid holding freezemutex during mmap operation

We use map-freezemutex to prevent races between mapfreeze() and memory mapping BPF map contents with writable permissions. The way we naively do this means we'll hold freezemutex 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 freezemutex 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]

IBM

Affected Software

11 affected components
Linux Kernel
Linux Linux kernel>=5.5<6.6.80
Linux Linux kernel>=6.7<6.12.17
Linux Linux kernel>=6.13<6.13.5
Linux Linux kernel=6.14-rc1
Linux Linux kernel=6.14-rc2
Linux Linux kernel=6.14-rc3
IBM Verify Identity Access<=11.0 - 11.0.2
IBM Security Verify Access<=10.0 - 10.0.9.1
IBM Verify Identity Access Container<=11.0 - 11.0.2
IBM Security Verify Access Container<=10.0 - 10.0.9.1

Event History

Mar 12, 2025
CVE Published
via MITRE·09:42 AM
Data Sourced
via MITRE·09:42 AM
Description
Data Sourced
via NVD·10:15 AM
RemedyDescriptionSeverityAffected Software
Data Sourced
via Red Hat·12:23 PM
DescriptionSeverityAffected Software
Jul 8, 2026
Data Sourced
via IBM·12:00 AM
DescriptionAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2025-21853?

CVE-2025-21853 has been classified as having a moderate severity level.

2

How do I fix CVE-2025-21853?

To fix CVE-2025-21853, update your Linux kernel to the latest version that addresses this vulnerability.

3

What are the potential impacts of CVE-2025-21853?

CVE-2025-21853 may allow for race conditions during memory mapping of BPF map contents, potentially leading to information leakage or system instability.

4

Which versions of the Linux kernel are affected by CVE-2025-21853?

CVE-2025-21853 affects certain versions of the Linux kernel prior to the patch being applied.

5

Is there a detailed technical explanation for CVE-2025-21853?

CVE-2025-21853 involves an issue with the freeze_mutex during mmap operations in BPF, leading to potential race conditions.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203