# CVE-2023-52447: bpf: Defer the free of inner map when necessary

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

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; 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.33% (percentile 19, 2026-11-26)
- **CWE:** CWE-416
- **Published:** 2024-02-22T16:21:39.032Z
- **Modified:** 2026-10-15T01:17:13.813Z

## Who should check

- Anyone running Linux \>= bba1dc0b55ac462d24ed1228ad49800c238cd6d7, \< 90c445799fd1dc214d7c6279c144e33a35e29ef2; \>= bba1dc0b55ac462d24ed1228ad49800c238cd6d7, \< 37d98fb9c3144c0fddf7f6e99aece9927ac8dce6; \>= bba1dc0b55ac462d24ed1228ad49800c238cd6d7, \< 62fca83303d608ad4fec3f7428c8685680bb01b0; \>= bba1dc0b55ac462d24ed1228ad49800c238cd6d7, \< f91cd728b10c51f6d4a39957ccd56d1e802fc8ee; \>= bba1dc0b55ac462d24ed1228ad49800c238cd6d7, \< bfd9b20c4862f41d4590fde11d70a5eeae53dcc5; \>= bba1dc0b55ac462d24ed1228ad49800c238cd6d7, \< 876673364161da50eed6b472d746ef88242b2368
- Anyone running Linux 5.9

## Description

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

bpf: Defer the free of inner map when necessary

When updating or deleting an inner map in map array or map htab, the map
may still be accessed by non-sleepable program or sleepable program.
However bpf\_map\_fd\_put\_ptr() decreases the ref-counter of the inner map
directly through bpf\_map\_put(), if the ref-counter is the last one
(which is true for most cases), the inner map will be freed by
ops-\>map\_free() in a kworker. But for now, most .map\_free() callbacks
don't use synchronize\_rcu() or its variants to wait for the elapse of a
RCU grace period, so after the invocation of ops-\>map\_free completes,
the bpf program which is accessing the inner map may incur
use-after-free problem.

Fix the free of inner map by invoking bpf\_map\_free\_deferred() after both
one RCU grace period and one tasks trace RCU grace period if the inner
map has been removed from the outer map before. The deferment is
accomplished by using call\_rcu() or call\_rcu\_tasks\_trace() when
releasing the last ref-counter of bpf map. The newly-added rcu\_head
field in bpf\_map shares the same storage space with work field to
reduce the size of bpf\_map.

## Affected and fixed versions

- Linux: \>= bba1dc0b55ac462d24ed1228ad49800c238cd6d7, \< 90c445799fd1dc214d7c6279c144e33a35e29ef2; \>= bba1dc0b55ac462d24ed1228ad49800c238cd6d7, \< 37d98fb9c3144c0fddf7f6e99aece9927ac8dce6; \>= bba1dc0b55ac462d24ed1228ad49800c238cd6d7, \< 62fca83303d608ad4fec3f7428c8685680bb01b0; \>= bba1dc0b55ac462d24ed1228ad49800c238cd6d7, \< f91cd728b10c51f6d4a39957ccd56d1e802fc8ee; \>= bba1dc0b55ac462d24ed1228ad49800c238cd6d7, \< bfd9b20c4862f41d4590fde11d70a5eeae53dcc5; \>= bba1dc0b55ac462d24ed1228ad49800c238cd6d7, \< 876673364161da50eed6b472d746ef88242b2368 (cvelist)
- Linux: 5.9 (cvelist)

## Mitigation

- Upgrade Linux to 876673364161da50eed6b472d746ef88242b2368 or later.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2023-52447.md
Affected: Linux >= bba1dc0b55ac462d24ed1228ad49800c238cd6d7, < 90c445799fd1dc214d7c6279c144e33a35e29ef2; >= bba1dc0b55ac462d24ed1228ad49800c238cd6d7, < 37d98fb9c3144c0fddf7f6e99aece9927ac8dce6; >= bba1dc0b55ac462d24ed1228ad49800c238cd6d7, < 62fca83303d608ad4fec3f7428c8685680bb01b0; >= bba1dc0b55ac462d24ed122…
Fixed in: Linux 90c445799fd1dc214d7c6279c144e33a35e29ef2, Linux 37d98fb9c3144c0fddf7f6e99aece9927ac8dce6, Linux 62fca83303d608ad4fec3f7428c8685680bb01b0, Linux 876673364161da50eed6b472d746ef88242b2368

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-2023-52447 being exploited?

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

### How serious is CVE-2023-52447?

High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2023-52447?

Linux \>= bba1dc0b55ac462d24ed1228ad49800c238cd6d7, \< 90c445799fd1dc214d7c6279c144e33a35e29ef2; \>= bba1dc0b55ac462d24ed1228ad49800c238cd6d7, \< 37d98fb9c3144c0fddf7f6e99aece9927ac8dce6; \>= bba1dc0b55ac462d24ed1228ad49800c238cd6d7, \< 62fca83303d608ad4fec3f7428c8685680bb01b0; \>= bba1dc0b55ac462d24ed1228ad49800c238cd6d7, \< f91cd728b10c51f6d4a39957ccd56d1e802fc8ee; \>= bba1dc0b55ac462d24ed1228ad49800c238cd6d7, \< bfd9b20c4862f41d4590fde11d70a5eeae53dcc5; \>= bba1dc0b55ac462d24ed1228ad49800c238cd6d7, \< 876673364161da50eed6b472d746ef88242b2368; Linux 5.9.

### Is there a fix for CVE-2023-52447?

Yes. Fixed in Linux 90c445799fd1dc214d7c6279c144e33a35e29ef2, Linux 37d98fb9c3144c0fddf7f6e99aece9927ac8dce6, Linux 62fca83303d608ad4fec3f7428c8685680bb01b0, Linux 876673364161da50eed6b472d746ef88242b2368. Upgrade Linux to 876673364161da50eed6b472d746ef88242b2368 or later.

### How do I check if I'm affected by CVE-2023-52447?

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/90c445799fd1dc214d7c6279c144e33a35e29ef2>
- patch: <https://git.kernel.org/stable/c/37d98fb9c3144c0fddf7f6e99aece9927ac8dce6>
- patch: <https://git.kernel.org/stable/c/62fca83303d608ad4fec3f7428c8685680bb01b0>
- patch: <https://git.kernel.org/stable/c/f91cd728b10c51f6d4a39957ccd56d1e802fc8ee>
- patch: <https://git.kernel.org/stable/c/bfd9b20c4862f41d4590fde11d70a5eeae53dcc5>
- patch: <https://git.kernel.org/stable/c/876673364161da50eed6b472d746ef88242b2368>
- other: <https://lists.debian.org/debian-lts-announce/2024/06/msg00017.html>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-265688.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-2023-52447>

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