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

- Severity: High 7.8 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.25%, higher than 17% of CVEs (2026-12-01)
- Published: 2024-02-22T16:21:39.032Z
- Modified: 2026-10-15T01:17:13.813Z
- Weaknesses: CWE-416
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total
- Assigned by: Linux

## 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.

(As written by CVE List.)

## Affected

- Linux Linux: from bba1dc0b55ac462d24ed1228ad49800c238cd6d7 before 90c445799fd1dc214d7c6279c144e33a35e29ef2; from bba1dc0b55ac462d24ed1228ad49800c238cd6d7 before 37d98fb9c3144c0fddf7f6e99aece9927ac8dce6; from bba1dc0b55ac462d24ed1228ad49800c238cd6d7 before 62fca83303d608ad4fec3f7428c8685680bb01b0; from bba1dc0b55ac462d24ed1228ad49800c238cd6d7 before f91cd728b10c51f6d4a39957ccd56d1e802fc8ee; from bba1dc0b55ac462d24ed1228ad49800c238cd6d7 before bfd9b20c4862f41d4590fde11d70a5eeae53dcc5; from bba1dc0b55ac462d24ed1228ad49800c238cd6d7 before 876673364161da50eed6b472d746ef88242b2368; 5.9 (not affected: before 5.9; from 5.10.214 up to 5.10.*; from 5.15.153 up to 5.15.*; from 6.1.75 up to 6.1.*; from 6.6.14 up to 6.6.*; from 6.7.2 up to 6.7.*; from 6.8 up to *)
- linux linux_kernel: from bba1dc0b55ac before 90c445799fd1; from bba1dc0b55ac before 37d98fb9c314; from bba1dc0b55ac before 62fca83303d6; from bba1dc0b55ac before f91cd728b10c; from bba1dc0b55ac before bfd9b20c4862; from bba1dc0b55ac before 876673364161; 5.9; from 5.9.0 before 5.10.214; from 5.11 before 5.15.153; from 5.16 before 6.1.75; from 6.2 before 6.6.14; from 6.7 before 6.7.2 (not affected: before 5.9; from 5.10.214 up to 5.10.*; from 5.15.153 up to 5.15.*; from 6.1.75 up to 6.1.*; from 6.6.14 up to 6.6.*; from 6.7.2 up to 6.7.*; from 6.8 up to *)

## Every score

- Linux: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- CISA-ADP: CVSS:3.1 6.7 Medium `CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 6.7 Medium `CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H`

## References

- <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> (patch)
- <https://lists.debian.org/debian-lts-announce/2024/06/msg00017.html>
- <https://cert-portal.siemens.com/productcert/html/ssa-265688.html>

## Sources

- CVE List: [CVE-2023-52447](https://www.cve.org/CVERecord?id=CVE-2023-52447), CVE Terms of Use, modified 2026-10-15
- NVD: [CVE-2023-52447](https://nvd.nist.gov/vuln/detail/CVE-2023-52447), Public domain, modified 2026-10-15

---

Page: https://cve.day/CVE-2023-52447 · Whole record: https://cve.day/CVE-2023-52447.json · Rebuilt by cve.day 2026-11-25T22:58:33.053Z
