CVE-2024-35970af_unix: Clear stale u->oob_skb.
- 6.3MediumCVSS base score
- 0.50%Exploitation in 30 daysEPSS · top 56% of all CVEs
- NoKnown exploitednot in CISA's KEV catalog
- NonePublic exploitsnone known yet
Description
In the Linux kernel, the following vulnerability has been resolved: af_unix: Clear stale u->oob_skb. syzkaller started to report deadlock of unix_gc_lock after commit 4090fa373f0e ("af_unix: Replace garbage collection algorithm."), but it just uncovers the bug that has been there since commit 314001f0bf92 ("af_unix: Add OOB support"). The repro basically does the following. from socket import * from array import array c1, c2 = socketpair(AF_UNIX, SOCK_STREAM) c1.sendmsg([b'a'], [(SOL_SOCKET, SCM_RIGHTS, array("i", [c2.fileno()]))], MSG_OOB) c2.recv(1) # blocked as no normal data in recv queue c2.close() # done async and unblock recv() c1.close() # done async and trigger GC A socket sends its file descriptor to itself as OOB data and tries to receive normal data, but finally recv() fails due to async close(). The problem here is wrong handling of OOB skb in manage_oob(). When recvmsg() is called without MSG_OOB, manage_oob() is called to check if the peeked skb is OOB skb. In such a case, manage_oob() pops it out of the receive queue but does not clear unix_sock(sk)->oob_skb. This is wrong in terms of uAPI. Let's say we send "hello" with MSG_OOB, and "world" without MSG_OOB. The 'o' is handled as OOB data. When recv() is called twice without MSG_OOB, the OOB data should be lost. >>> from socket import * >>> c1, c2 = socketpair(AF_UNIX, SOCK_STREAM, 0) >>> c1.send(b'hello', MSG_OOB) # 'o' is OOB data 5 >>> c1.send(b'world') 5 >>> c2.recv(5) # OOB data is not received b'hell' >>> c2.recv(5) # OOB date is skipped b'world' >>> c2.recv(5, MSG_OOB) # This should return an error b'o' In the same situation, TCP actually returns -EINVAL for the last recv(). Also, if we do not clear unix_sk(sk)->oob_skb, unix_poll() always set EPOLLPRI even though the data has passed through by previous recv(). To avoid these issues, we must clear unix_sk(sk)->oob_skb when dequeuing it from recv queue. The reason why the old GC did not trigger the deadlock is because the old GC relied on the receive queue to detect the loop. When it is triggered, the socket with OOB data is marked as GC candidate because file refcount == inflight count (1). However, after traversing all inflight sockets, the socket still has a positive inflight count (1), thus the socket is excluded from candidates. Then, the old GC lose the chance to garbage-collect the socket. With the old GC, the repro continues to create true garbage that will never be freed nor detected by kmemleak as it's linked to the global inflight list. That's why we couldn't even notice the issue.
Timeline
ID reserved
By Linux
- 3 days later
· 3 days later
Published
- 24 months later
· 24 months later
Record updated
Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| CISA-ADPADP (enrichment) | 3.1 | Medium6.3 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L |
| NVDNVD · Analyzed | 3.1 | Medium6.3 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L |
- EPSS (exploitation in 30 days)
- 0.50% · top 56% of all CVEs (15 Nov 2026)
- CISA SSVC
- Exploitation: none · Automatable: no · Technical impact: partial
The list uses the assigner's score when there is one, then CISA's, then NVD's: Medium 6.3.
Affected products
- affected 314001f0bf927015e459c9d387d62a231fe93af3 – < b4bc99d04c689b5652665394ae8d3e02fb754153
- affected 314001f0bf927015e459c9d387d62a231fe93af3 – < 84a352b7eba1142a95441380058985ff19f25ec9
- affected 314001f0bf927015e459c9d387d62a231fe93af3 – < 601a89ea24d05089debfa2dc896ea9f5937ac7a6
- affected 314001f0bf927015e459c9d387d62a231fe93af3 – < 698a95ade1a00e6494482046902b986dfffd1caf
- affected 314001f0bf927015e459c9d387d62a231fe93af3 – < b46f4eaa4f0ec38909fb0072eea3aeddb32f954e
- affected 5.15
- unaffected < 5.15
- unaffected 5.15.156 – ≤ 5.15.*
- unaffected 6.1.87 – ≤ 6.1.*
- unaffected 6.6.28 – ≤ 6.6.*
- unaffected 6.8.7 – ≤ 6.8.*
- unaffected 6.9 – ≤ *
References
References5
- https://git.kernel.org/stable/c/b4bc99d04c689b5652665394ae8d3e02fb754153 (opens in a new tab)x_transferred
- https://git.kernel.org/stable/c/84a352b7eba1142a95441380058985ff19f25ec9 (opens in a new tab)x_transferred
- https://git.kernel.org/stable/c/601a89ea24d05089debfa2dc896ea9f5937ac7a6 (opens in a new tab)x_transferred
- https://git.kernel.org/stable/c/698a95ade1a00e6494482046902b986dfffd1caf (opens in a new tab)x_transferred
- https://git.kernel.org/stable/c/b46f4eaa4f0ec38909fb0072eea3aeddb32f954e (opens in a new tab)x_transferred
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- EUVD EUVD-2024-35688 (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisories (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://cveledger.app/cve/CVE-2024-35970)Record last updated .