CVE-2023-52447
Last modified
CVE-2023-52447 is a medium-severity vulnerability rated 6.7/10 on the CVSS scale. 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. EPSS estimates a 0.25% chance of exploitation in the next 30 days.
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.
Metrics
CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H
Weakness Enumeration
Affected Software
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux Kernel | >= 5.9.0, < 5.10.214 |
| Linux | Linux Kernel | >= 5.11, < 5.15.153 |
| Linux | Linux Kernel | >= 5.16, < 6.1.75 |
| Linux | Linux Kernel | >= 6.2, < 6.6.14 |
| Linux | Linux Kernel | >= 6.7, < 6.7.2 |
References
Timeline
- Published
- Last Modified
- Status
- Modified
Frequently Asked Questions
What is CVE-2023-52447?
How severe is CVE-2023-52447?
How do I fix CVE-2023-52447?
How Strix Helps
- How Strix found a critical auth bypass in etcdStrix autonomously discovered a critical authentication bypass in etcd, later designated CVE-2026-33413.
- Autonomous PentestingAI agents that find and validate exploitable vulnerabilities like this one across your applications.
- PR ReviewsPentest every pull request so vulnerable code is caught before it ships to production.
- AI Penetration TestingHow AI-driven penetration testing continuously covers your attack surface.
Related CVEs from 2023
- CVE-2023-52441In the Linux kernel, the following vulnerability has been re…7.8
- CVE-2023-52442In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2023-52443In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2023-52444In the Linux kernel, the following vulnerability has been re…7.8
- CVE-2023-52445In the Linux kernel, the following vulnerability has been re…7.8
- CVE-2023-52446In the Linux kernel, the following vulnerability has been re…7.8
- CVE-2023-52448In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2023-52449In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2023-5245FileUtil.extract() enumerates all zip file entries and extra…9.8
- CVE-2023-52450In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2023-52451In the Linux kernel, the following vulnerability has been re…7.8
- CVE-2023-52452In the Linux kernel, the following vulnerability has been re…7.8
Are you affected by CVE-2023-52447?
Run a free Strix scan to check your systems for this vulnerability.
Scan your code nowSource: NVD / NIST
