VDB

CVE-2024-26923

CVE-2024-26923 PUBLISHED CVSS 7.8 HIGH

af_unix: Fix garbage collector racing against connect()

Reported by linux · Published April 24, 2024

In the Linux kernel, the following vulnerability has been resolved: af_unix: Fix garbage collector racing against connect() Garbage collector does not take into account the risk of embryo getting enqueued during the garbage collection. If such embryo has a peer that carries SCM_RIGHTS, two consecutive passes of scan_children() may see a different set of children. Leading to an incorrectly elevated inflight count, and then a dangling pointer within the gc_inflight_list. sockets are AF_UNIX/SOCK_STREAM S is an unconnected socket L is a listening in-flight socket bound to addr, not in fdtable V's fd will be passed via sendmsg(), gets inflight count bumped connect(S, addr) sendmsg(S, [V]); close(V) __unix_gc() ---------------- ------------------------- ----------- NS = unix_create1() skb1 = sock_wmalloc(NS) L = unix_find_other(addr) unix_state_lock(L) unix_peer(S) = NS // V count=1 inflight=0 NS = unix_peer(S) skb2 = sock_alloc() skb_queue_tail(NS, skb2[V]) // V became in-flight // V count=2 inflight=1 close(V) // V count=1 inflight=1 // GC candidate condition met for u in gc_inflight_list: if (total_refs == inflight_refs) add u to gc_candidates // gc_candidates={L, V} for u in gc_candidates: scan_children(u, dec_inflight) // embryo (skb1) was not // reachable from L yet, so V's // inflight remains unchanged __skb_queue_tail(L, skb1) unix_state_unlock(L) for u in gc_candidates: if (u.inflight) scan_children(u, inc_inflight_move_tail) // V count=1 inflight=2 (!) If there is a GC-candidate listening socket, lock/unlock its state. This makes GC wait until the end of any ongoing connect() to that socket. After flipping the lock, a possibly SCM-laden embryo is already enqueued. And if there is another embryo coming, it can not possibly carry SCM_RIGHTS. At this point, unix_inflight() can not happen because unix_gc_lock is already taken. Inflight graph remains unaffected.

Fixed versions

Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.

PackageEcosystemFixed in
bpftoolAmazon Linux6.1.87-99.174.amzn2023
kernel-livepatch-4.14.348-265.562Amazon Linux1.0-0.amzn2
kernel-tools-develAmazon Linux6.1.87-99.174.amzn2023
kernel-libbpfAmazon Linux6.1.87-99.174.amzn2023
kernel-develAmazon Linux4.14.348-265.562.amzn2
linux_kernellinux6.8.7, 6.6.28, 6.1.87, 5.15.156, 5.10.216, 5.4.275, 4.19.314
SIPLUS S7-1500 CPU 1518-4 PN/DP MFPSiemens3.1.5
RUGGEDCOM RST2428PSiemens3.1
SCALANCE XCM-/XRM-/XCH-/XRH-300 familySiemens3.1
LinuxLinuxb75722be422c276b699200de90527d01c602ea7c, 2.6.23

Risk scores

CVSS 3.1
7.8
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Affected products

VendorProductVersions
LinuxLinux1fd05ba5a2f2aa8e7b9b52ef55df850e2e7d54c9, 1fd05ba5a2f2aa8e7b9b52ef55df850e2e7d54c9, 1fd05ba5a2f2aa8e7b9b52ef55df850e2e7d54c9
LinuxLinux2.6.23, 0, 4.19.314
SiemensSIPLUS S7-1500 CPU 1518-4 PN/DP MFP3.1.0
amazon:2023bpftool0
SiemensRUGGEDCOM RST2428P0
amazon:2kernel-livepatch-4.14.348-265.5620
SiemensSCALANCE XC-300/XR-300/XC-400/XR-500WG/XR-500 family0
amazon:2023kernel-tools-devel0
SiemensSCALANCE XCM-/XRM-/XCH-/XRH-300 family0
amazon:2023kernel-libbpf0
amazon:2kernel-devel0
LinuxLinux6.9, 1fd05ba5a2f2aa8e7b9b52ef55df850e2e7d54c9, 1fd05ba5a2f2aa8e7b9b52ef55df850e2e7d54c9
linuxlinux_kernel2.6.23, 2.6.23, 2.6.23
amazon:2023kernel-libbpf-static0
SiemensSIMATIC S7-1500 CPU 1518-4 PN/DP MFP3.1.0
amazon:2023perf0
amazon:2023kernel0
amazon:2kernel-headers0
amazon:2023kernel-devel0
SiemensSIMATIC S7-1500 CPU 1518F-4 PN/DP MFP3.1.0

…and 13 more

Timeline

  • Apr 24, 2024 CVE Published
  • Apr 25, 2024 EPSS Score (30 in total, the first dated here)
  • Oct 4, 2024 Coalition ESS Score (12 in total, the first dated here)
  • Dec 16, 2025 PoC Published (2 in total, the first dated here)
  • Jan 15, 2026 Security Advisory (165 in total, the first dated here)
  • Mar 30, 2026 Distribution Patch (99 in total, the first dated here)
  • Nov 3, 2026 CVE Updated

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2024-26923
vulnetix vdb fixes CVE-2024-26923

Or with curl, using the org id and key from your account page:

curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
  "https://api.vdb.vulnetix.com/v2/vuln/CVE-2024-26923/fixes/registry"

The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›