# CVE-2025-21853: bpf: avoid holding freeze\_mutex during mmap operation

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.31% (percentile 16, 2026-11-26)
- **Published:** 2025-03-12T09:42:07.871Z
- **Modified:** 2026-11-10T13:17:37.047Z

## Who should check

- Anyone running Linux \>= fc9702273e2edb90400a34b3be76f7b08fa3344b, \< 2ce31c97c219b4fe797749f950274f246eb88c49; \>= fc9702273e2edb90400a34b3be76f7b08fa3344b, \< 0d90d9e154144a3a80e9fc0eb9b21b7fc990f68f; \>= fc9702273e2edb90400a34b3be76f7b08fa3344b, \< 4759acbd44d24a69b7b14848012ec4201d6c5501; \>= fc9702273e2edb90400a34b3be76f7b08fa3344b, \< 29cfda62ab4d92ab94123813db49ab76c1e61b29; \>= fc9702273e2edb90400a34b3be76f7b08fa3344b, \< d95607a5f2f9bb08194c9deaf4a5f3e8ba59a9d4; \>= fc9702273e2edb90400a34b3be76f7b08fa3344b, \< 271e49f8a58edba65bc2b1250a0abaa98c4bfdbe; \>= fc9702273e2edb90400a34b3be76f7b08fa3344b, \< bc27c52eea189e8f7492d40739b7746d67b65beb
- Anyone running Linux 5.5

## 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/678dcbc9.050a0220.303755.0066.GAE@google.com/

## Affected and fixed versions

- Linux: \>= fc9702273e2edb90400a34b3be76f7b08fa3344b, \< 2ce31c97c219b4fe797749f950274f246eb88c49; \>= fc9702273e2edb90400a34b3be76f7b08fa3344b, \< 0d90d9e154144a3a80e9fc0eb9b21b7fc990f68f; \>= fc9702273e2edb90400a34b3be76f7b08fa3344b, \< 4759acbd44d24a69b7b14848012ec4201d6c5501; \>= fc9702273e2edb90400a34b3be76f7b08fa3344b, \< 29cfda62ab4d92ab94123813db49ab76c1e61b29; \>= fc9702273e2edb90400a34b3be76f7b08fa3344b, \< d95607a5f2f9bb08194c9deaf4a5f3e8ba59a9d4; \>= fc9702273e2edb90400a34b3be76f7b08fa3344b, \< 271e49f8a58edba65bc2b1250a0abaa98c4bfdbe; \>= fc9702273e2edb90400a34b3be76f7b08fa3344b, \< bc27c52eea189e8f7492d40739b7746d67b65beb (cvelist)
- Linux: 5.5 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2025-21853. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2025-21853.md
Affected: Linux >= fc9702273e2edb90400a34b3be76f7b08fa3344b, < 2ce31c97c219b4fe797749f950274f246eb88c49; >= fc9702273e2edb90400a34b3be76f7b08fa3344b, < 0d90d9e154144a3a80e9fc0eb9b21b7fc990f68f; >= fc9702273e2edb90400a34b3be76f7b08fa3344b, < 4759acbd44d24a69b7b14848012ec4201d6c5501; >= fc9702273e2edb90400a34b…
Fixed in: Linux 2ce31c97c219b4fe797749f950274f246eb88c49, Linux 0d90d9e154144a3a80e9fc0eb9b21b7fc990f68f, Linux 4759acbd44d24a69b7b14848012ec4201d6c5501, Linux 29cfda62ab4d92ab94123813db49ab76c1e61b29, Linux 271e49f8a58edba65bc2b1250a0abaa98c4bfdbe

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2025-21853 being exploited?

There is no confirmed exploitation: CVE-2025-21853 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.31% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2025-21853?

Medium: CVSS 5.5 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2025-21853?

Linux \>= fc9702273e2edb90400a34b3be76f7b08fa3344b, \< 2ce31c97c219b4fe797749f950274f246eb88c49; \>= fc9702273e2edb90400a34b3be76f7b08fa3344b, \< 0d90d9e154144a3a80e9fc0eb9b21b7fc990f68f; \>= fc9702273e2edb90400a34b3be76f7b08fa3344b, \< 4759acbd44d24a69b7b14848012ec4201d6c5501; \>= fc9702273e2edb90400a34b3be76f7b08fa3344b, \< 29cfda62ab4d92ab94123813db49ab76c1e61b29; \>= fc9702273e2edb90400a34b3be76f7b08fa3344b, \< d95607a5f2f9bb08194c9deaf4a5f3e8ba59a9d4; \>= fc9702273e2edb90400a34b3be76f7b08fa3344b, \< 271e49f8a58edba65bc2b1250a0abaa98c4bfdbe; \>= fc9702273e2edb90400a34b3be76f7b08fa3344b, \< bc27c52eea189e8f7492d40739b7746d67b65beb; Linux 5.5.

### Is there a fix for CVE-2025-21853?

Yes. Fixed in Linux 2ce31c97c219b4fe797749f950274f246eb88c49, Linux 0d90d9e154144a3a80e9fc0eb9b21b7fc990f68f, Linux 4759acbd44d24a69b7b14848012ec4201d6c5501, Linux 29cfda62ab4d92ab94123813db49ab76c1e61b29, Linux 271e49f8a58edba65bc2b1250a0abaa98c4bfdbe. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2025-21853?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/29cfda62ab4d92ab94123813db49ab76c1e61b29>
- patch: <https://git.kernel.org/stable/c/d95607a5f2f9bb08194c9deaf4a5f3e8ba59a9d4>
- patch: <https://git.kernel.org/stable/c/271e49f8a58edba65bc2b1250a0abaa98c4bfdbe>
- patch: <https://git.kernel.org/stable/c/bc27c52eea189e8f7492d40739b7746d67b65beb>
- other: <https://git.kernel.org/stable/c/2ce31c97c219b4fe797749f950274f246eb88c49>
- other: <https://git.kernel.org/stable/c/0d90d9e154144a3a80e9fc0eb9b21b7fc990f68f>
- other: <https://git.kernel.org/stable/c/4759acbd44d24a69b7b14848012ec4201d6c5501>
- other: <https://lists.debian.org/debian-lts-announce/2025/05/msg00045.html>
- other: <https://lists.debian.org/debian-lts-announce/2025/05/msg00030.html>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-019113.html>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-457936.html>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2025-21853>

HTML: <https://flawdb.com/CVE-2025-21853> · JSON: <https://flawdb.com/api/v1/entries/CVE-2025-21853>
