CVE-2024-26923
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.
| Package | Ecosystem | Fixed in |
|---|---|---|
| bpftool | Amazon Linux | 6.1.87-99.174.amzn2023 |
| kernel-livepatch-4.14.348-265.562 | Amazon Linux | 1.0-0.amzn2 |
| kernel-tools-devel | Amazon Linux | 6.1.87-99.174.amzn2023 |
| kernel-libbpf | Amazon Linux | 6.1.87-99.174.amzn2023 |
| kernel-devel | Amazon Linux | 4.14.348-265.562.amzn2 |
| linux_kernel | linux | 6.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 MFP | Siemens | 3.1.5 |
| RUGGEDCOM RST2428P | Siemens | 3.1 |
| SCALANCE XCM-/XRM-/XCH-/XRH-300 family | Siemens | 3.1 |
| Linux | Linux | b75722be422c276b699200de90527d01c602ea7c, 2.6.23 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | 1fd05ba5a2f2aa8e7b9b52ef55df850e2e7d54c9, 1fd05ba5a2f2aa8e7b9b52ef55df850e2e7d54c9, 1fd05ba5a2f2aa8e7b9b52ef55df850e2e7d54c9 |
| Linux | Linux | 2.6.23, 0, 4.19.314 |
| Siemens | SIPLUS S7-1500 CPU 1518-4 PN/DP MFP | 3.1.0 |
| amazon:2023 | bpftool | 0 |
| Siemens | RUGGEDCOM RST2428P | 0 |
| amazon:2 | kernel-livepatch-4.14.348-265.562 | 0 |
| Siemens | SCALANCE XC-300/XR-300/XC-400/XR-500WG/XR-500 family | 0 |
| amazon:2023 | kernel-tools-devel | 0 |
| Siemens | SCALANCE XCM-/XRM-/XCH-/XRH-300 family | 0 |
| amazon:2023 | kernel-libbpf | 0 |
| amazon:2 | kernel-devel | 0 |
| Linux | Linux | 6.9, 1fd05ba5a2f2aa8e7b9b52ef55df850e2e7d54c9, 1fd05ba5a2f2aa8e7b9b52ef55df850e2e7d54c9 |
| linux | linux_kernel | 2.6.23, 2.6.23, 2.6.23 |
| amazon:2023 | kernel-libbpf-static | 0 |
| Siemens | SIMATIC S7-1500 CPU 1518-4 PN/DP MFP | 3.1.0 |
| amazon:2023 | perf | 0 |
| amazon:2023 | kernel | 0 |
| amazon:2 | kernel-headers | 0 |
| amazon:2023 | kernel-devel | 0 |
| Siemens | SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP | 3.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
References
- https://lists.debian.org/debian-lts-announce/2024/06/msg00017.html url
- https://lists.debian.org/debian-lts-announce/2024/06/msg00020.html url
- https://cert-portal.siemens.com/productcert/html/ssa-398330.html url
- https://cert-portal.siemens.com/productcert/html/ssa-265688.html url
- https://cert-portal.siemens.com/productcert/html/ssa-613116.html url