cbcvebase.
CVE-2023-52447
published 2024-02-22

CVE-2023-52447: 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…

PriorityP427medium6.7CVSS 3.1
AVLACLPRHUINSUCHIHAH
EPSS
0.25%
16.2th percentile
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

24 ranges
VendorProductVersion rangeFixed in
debianlinux< linux 6.1.76-1 (bookworm)linux 6.1.76-1 (bookworm)
linuxlinux
linuxlinux>= bba1dc0b55ac462d24ed1228ad49800c238cd6d7 < 90c445799fd1dc214d7c6279c144e33a35e29ef290c445799fd1dc214d7c6279c144e33a35e29ef2
linuxlinux>= bba1dc0b55ac462d24ed1228ad49800c238cd6d7 < 37d98fb9c3144c0fddf7f6e99aece9927ac8dce637d98fb9c3144c0fddf7f6e99aece9927ac8dce6
linuxlinux>= bba1dc0b55ac462d24ed1228ad49800c238cd6d7 < 62fca83303d608ad4fec3f7428c8685680bb01b062fca83303d608ad4fec3f7428c8685680bb01b0
linuxlinux>= bba1dc0b55ac462d24ed1228ad49800c238cd6d7 < f91cd728b10c51f6d4a39957ccd56d1e802fc8eef91cd728b10c51f6d4a39957ccd56d1e802fc8ee
linuxlinux>= bba1dc0b55ac462d24ed1228ad49800c238cd6d7 < bfd9b20c4862f41d4590fde11d70a5eeae53dcc5bfd9b20c4862f41d4590fde11d70a5eeae53dcc5
linuxlinux>= bba1dc0b55ac462d24ed1228ad49800c238cd6d7 < 876673364161da50eed6b472d746ef88242b2368876673364161da50eed6b472d746ef88242b2368
linuxlinux_kernel>= 0 < 5.10.216-15.10.216-1
linuxlinux_kernel>= 0 < 6.1.76-16.1.76-1
linuxlinux_kernel>= 0 < 6.6.15-16.6.15-1
linuxlinux_kernel>= 0 < 6.6.15-16.6.15-1
linuxlinux_kernel>= 0 < 5.15.0-112.1225.15.0-112.122
linuxlinux_kernel>= 5.11 < 5.15.1535.15.153
linuxlinux_kernel>= 5.16 < 6.1.756.1.75
linuxlinux_kernel>= 5.9.0 < 5.10.2145.10.214
linuxlinux_kernel>= 6.2 < 6.6.146.6.14
linuxlinux_kernel>= 6.7 < 6.7.26.7.2
msrccbl2_hyperv-daemons_5.15.148.2-1_on_cbl_mariner_2.0
msrccbl2_hyperv-daemons_5.15.153.1-1_on_cbl_mariner_2.0
msrccbl2_kernel_5.15.158.1-1_on_cbl_mariner_2.0
msrccbl2_kernel_5.15.164.1-1_on_cbl_mariner_2.0
msrccbl_mariner_2.0_arm
msrccbl_mariner_2.0_x64

CVSS provenance

nvdv3.16.7MEDIUMCVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H
osv7.5HIGH
vendor_ubuntu7.5HIGH
vendor_debian6.7MEDIUM
vendor_msrc6.7MEDIUM
vendor_redhat6.7MEDIUM
Stop checking back — get the weekly exploitation signal.

Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.