Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1359 CNY

100%

CVE-2024-58088— bpf: Fix deadlock when freeing cgroup storage

Quick assessment

Affected
Linux Linux
Exploitation
No confirmed in-the-wild exploitation; assess based on exposure
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel存在安全漏洞,该漏洞源于释放cgroup存储时可能导致死锁。

AI Predicted 5.5 Difficulty: Moderate EPSS 0.18% · P7

Affected Version Matrix 10

VendorProduct Version RangeStatus
Linux Linux c4bcfb38a95edb1021a53f2d0356a78120ecfbe4< 6ecb9fa14eec5f15d97c84c36896871335f6ddfb affected
c4bcfb38a95edb1021a53f2d0356a78120ecfbe4< fac674d2bd68f3479f27328626b42d1eebd11fef affected
c4bcfb38a95edb1021a53f2d0356a78120ecfbe4< fcec95b4ab3e7bc6b2f36e5d59f7e24104ea87f7 affected
c4bcfb38a95edb1021a53f2d0356a78120ecfbe4< c78f4afbd962f43a3989f45f3ca04300252b19b5 affected
6.2 affected
< 6.2 unaffected
6.6.80≤ 6.6.* unaffected
6.12.17≤ 6.12.* unaffected
… +2 more rows
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2024-58088

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
bpf: Fix deadlock when freeing cgroup storage
Source: CVE Program / CVE List V5
Vulnerability Description
In the Linux kernel, the following vulnerability has been resolved: bpf: Fix deadlock when freeing cgroup storage The following commit bc235cdb423a ("bpf: Prevent deadlock from recursive bpf_task_storage_[get|delete]") first introduced deadlock prevention for fentry/fexit programs attaching on bpf_task_storage helpers. That commit also employed the logic in map free path in its v6 version. Later bpf_cgrp_storage was first introduced in c4bcfb38a95e ("bpf: Implement cgroup storage available to non-cgroup-attached bpf progs") which faces the same issue as bpf_task_storage, instead of its busy counter, NULL was passed to bpf_local_storage_map_free() which opened a window to cause deadlock: <TASK> (acquiring local_storage->lock) _raw_spin_lock_irqsave+0x3d/0x50 bpf_local_storage_update+0xd1/0x460 bpf_cgrp_storage_get+0x109/0x130 bpf_prog_a4d4a370ba857314_cgrp_ptr+0x139/0x170 ? __bpf_prog_enter_recur+0x16/0x80 bpf_trampoline_6442485186+0x43/0xa4 cgroup_storage_ptr+0x9/0x20 (holding local_storage->lock) bpf_selem_unlink_storage_nolock.constprop.0+0x135/0x160 bpf_selem_unlink_storage+0x6f/0x110 bpf_local_storage_map_free+0xa2/0x110 bpf_map_free_deferred+0x5b/0x90 process_one_work+0x17c/0x390 worker_thread+0x251/0x360 kthread+0xd2/0x100 ret_from_fork+0x34/0x50 ret_from_fork_asm+0x1a/0x30 </TASK> Progs: - A: SEC("fentry/cgroup_storage_ptr") - cgid (BPF_MAP_TYPE_HASH) Record the id of the cgroup the current task belonging to in this hash map, using the address of the cgroup as the map key. - cgrpa (BPF_MAP_TYPE_CGRP_STORAGE) If current task is a kworker, lookup the above hash map using function parameter @owner as the key to get its corresponding cgroup id which is then used to get a trusted pointer to the cgroup through bpf_cgroup_from_id(). This trusted pointer can then be passed to bpf_cgrp_storage_get() to finally trigger the deadlock issue. - B: SEC("tp_btf/sys_enter") - cgrpb (BPF_MAP_TYPE_CGRP_STORAGE) The only purpose of this prog is to fill Prog A's hash map by calling bpf_cgrp_storage_get() for as many userspace tasks as possible. Steps to reproduce: - Run A; - while (true) { Run B; Destroy B; } Fix this issue by passing its busy counter to the free procedure so it can be properly incremented before storage/smap locking.
Source: CVE Program / CVE List V5
CVSS Information
N/A
Source: CVE Program / CVE List V5
Vulnerability Type
N/A
Source: CVE Program / CVE List V5
Vulnerability Title
Linux kernel 安全漏洞
Source: CNNVD (China National Vulnerability Database)
Vulnerability Description
Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel存在安全漏洞,该漏洞源于释放cgroup存储时可能导致死锁。
Source: CNNVD (China National Vulnerability Database)
CVSS Information
N/A
Source: CNNVD (China National Vulnerability Database)
Vulnerability Type
N/A
Source: CNNVD (China National Vulnerability Database)

Affected Products

Vendor Product Affected Versions CPE Subscribe
Linux Linux c4bcfb38a95edb1021a53f2d0356a78120ecfbe4 ~ 6ecb9fa14eec5f15d97c84c36896871335f6ddfb -
Linux Linux 6.2 -

II. Public POCs for CVE-2024-58088

# POC Description Source Link Shenlong Link
AI-Generated POC Premium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2024-58088

请登录查看更多情报信息。

Other References for CVE-2024-58088 (3)

Same Patch Batch · Linux · 2025-03-12 · 26 CVEs total

CVE-2024-58087 9.8 CRITICAL ksmbd: fix racy issue from session lookup and expire
CVE-2025-21850 9.8 CRITICAL nvmet: Fix crash when a namespace is disabled
CVE-2025-21855 8.6 HIGH ibmvnic: Don't reference skb after sending to VIOS
CVE-2024-58089 7.8 HIGH btrfs: fix double accounting race when btrfs_run_delalloc_range() failed
CVE-2025-21858 7.8 HIGH geneve: Fix use-after-free in geneve_find_dev().
CVE-2025-21851 7.8 HIGH bpf: Fix softlockup in arena_map_free on 64k page kernel
CVE-2025-21864 7.8 HIGH tcp: drop secpath at the same time as we currently drop dst
CVE-2025-21844 7.5 HIGH smb: client: Add check for next_buffer in receive_encrypted_standard()
CVE-2025-21852 net: Add rx_skb of kfree_skb to raw_tp_null_args[].
CVE-2025-21865 gtp: Suppress list corruption splat in gtp_net_exit_batch_rtnl().
CVE-2025-21845 mtd: spi-nor: sst: Fix SST write failure
CVE-2025-21846 acct: perform last write from workqueue
CVE-2025-21848 nfp: bpf: Add check for nfp_app_ctrl_msg_alloc()
CVE-2025-21847 ASoC: SOF: stream-ipc: Check for cstream nullity in sof_ipc_msg_data()
CVE-2025-21849 drm/i915/gt: Use spin_lock_irqsave() in interruptible context
CVE-2025-21863 io_uring: prevent opcode speculation
CVE-2025-21853 bpf: avoid holding freeze_mutex during mmap operation
CVE-2025-21866 powerpc/code-patching: Fix KASAN hit by not flagging text patching area as VM_ALLOC
CVE-2025-21854 sockmap, vsock: For connectible sockets allow only connected
CVE-2025-21856 s390/ism: add release function for struct device

Showing top 20 of 26 CVEs. View all on vendor page &rarr; →

IV. Related Vulnerabilities

V. Comments for CVE-2024-58088

No comments yet


Leave a comment