🛡️ UBUNTU-CVE-2024-35970
⚪ Unknown ✅ No Known Exploit OSV
N/A
CVSS Score
0 Low4 Medium7 High9 Critical10

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.

Details

Severity Unknown
CVSS Score N/A
CVSS Vector CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L
CWE N/A
Public Exploit ✅ No
Source OSV
Published 2024-05-20
Updated 2026-06-15
Modified 2026-06-03
Fix URL N/A

Affected Packages

Software From version Fixed in
linux 6.8.0-38.38
linux-allwinner-5.19
linux-aws 6.8.0-1011.12
linux-aws-5.0
linux-aws-5.11
linux-aws-5.13
linux-aws-5.15 5.15.0-1065.71~20.04.1
linux-aws-5.19
linux-aws-5.3
linux-aws-5.8
linux-aws-6.2
linux-aws-6.5
linux-aws-6.8 6.8.0-1011.12~22.04.1
linux-aws-fips 5.15.0-1065.71+fips1
linux-azure 6.8.0-1010.10
linux-azure-5.11
linux-azure-5.13
linux-azure-5.15 5.15.0-1068.77~20.04.1
linux-azure-5.19
linux-azure-5.3
linux-azure-5.8
linux-azure-6.2
linux-azure-6.5
linux-azure-6.8 6.8.0-1010.10~22.04.1
linux-azure-edge
linux-azure-fde 5.15.0-1068.77.1
linux-azure-fde-5.19
linux-azure-fde-6.2
linux-azure-fips 5.15.0-1068.77+fips1
linux-bluefield
linux-fips 5.15.0-115.125+fips1
linux-gcp 6.8.0-1010.11
linux-gcp-5.11
linux-gcp-5.13
linux-gcp-5.15 5.15.0-1065.73~20.04.1
linux-gcp-5.19
linux-gcp-5.3
linux-gcp-5.8
linux-gcp-6.2
linux-gcp-6.5
linux-gcp-fips 5.15.0-1064.72+fips1
linux-gke 6.8.0-1006.9
linux-gke-4.15
linux-gke-5.15
linux-gke-5.4
linux-gkeop 5.15.0-1048.55
linux-gkeop-5.15 5.15.0-1048.55~20.04.1
linux-gkeop-5.4
linux-hwe
linux-hwe-5.11
linux-hwe-5.13
linux-hwe-5.15 5.15.0-116.126~20.04.1
linux-hwe-5.19
linux-hwe-5.8
linux-hwe-6.2
linux-hwe-6.5
linux-hwe-edge
linux-ibm 6.8.0-1008.8
linux-ibm-5.15 5.15.0-1058.61~20.04.1
linux-intel 6.8.0-1007.14
linux-intel-5.13
linux-intel-iot-realtime 5.15.0-1058.60
linux-intel-iotg 5.15.0-1060.66
linux-intel-iotg-5.15 5.15.0-1060.66~20.04.1
linux-kvm 5.15.0-1062.67
linux-lowlatency 6.8.0-38.38.1
linux-lowlatency-hwe-5.15 5.15.0-116.126~20.04.1
linux-lowlatency-hwe-5.19
linux-lowlatency-hwe-6.2
linux-lowlatency-hwe-6.5
linux-nvidia 6.8.0-1009.9
linux-nvidia-6.2
linux-nvidia-6.5
linux-nvidia-6.8 6.8.0-1009.9~22.04.1
linux-nvidia-tegra 5.15.0-1026.26
linux-nvidia-tegra-5.15 5.15.0-1027.27~20.04.1
linux-nvidia-tegra-igx 5.15.0-1015.15
linux-oem
linux-oem-5.10
linux-oem-5.13
linux-oem-5.14
linux-oem-5.17
linux-oem-5.6
linux-oem-6.0
linux-oem-6.1
linux-oem-6.5
linux-oem-6.8 6.8.0-1008.8
linux-oracle 6.8.0-1008.8
linux-oracle-5.0
linux-oracle-5.11
linux-oracle-5.13
linux-oracle-5.15 5.15.0-1063.69~20.04.1
linux-oracle-5.3
linux-oracle-5.8
linux-oracle-6.5
linux-oracle-6.8 6.8.0-1008.8~22.04.1
linux-raspi 6.8.0-1007.7
linux-raspi-realtime 6.8.0-2006.6
linux-raspi2
linux-realtime 6.8.1-1004.4
linux-riscv 6.8.0-38.38.1
linux-riscv-5.11
linux-riscv-5.15 5.15.0-1061.65~20.04.1
linux-riscv-5.19
linux-riscv-5.8
linux-riscv-6.5
linux-starfive-5.19
linux-starfive-6.2
linux-starfive-6.5
linux-xilinx-zynqmp 5.15.0-1035.39

References

Similar Threats

Free Vulnerability Check

Is your WordPress site affected?

BotEraser helps you identify potentially vulnerable plugins and themes by checking your installation against known CVE records.

Scan My Site Free →

No credit card required  ·  Results in minutes

ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.