CVE & CISA-KEV Catalog

CVE-2024-35970

MEDIUM
6.3
CVSS v3
NVD

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.

How to fix

Remediation Available
linuxDebian
Fixed in:6.1.90-1CVE-2024-35970
Fixed in:6.8.9-1CVE-2024-35970
Fixed in:6.8.9-1CVE-2024-35970
linuxUbuntu
Fixed in:5.15.0-116.126USN-6898-1
Fixed in:6.8.0-38.38USN-6893-1
linux-awsUbuntu
Fixed in:5.15.0-1065.71USN-6898-3
Fixed in:6.8.0-1011.12USN-6893-3
linux-aws-5.15Ubuntu
Fixed in:5.15.0-1065.71~20.04.1USN-6898-4
linux-azureUbuntu
Fixed in:5.15.0-1068.77USN-6917-1
Fixed in:6.8.0-1010.10USN-6893-1
linux-azure-5.15Ubuntu
Fixed in:5.15.0-1068.77~20.04.1USN-6917-1
linux-azure-fdeUbuntu
Fixed in:5.15.0-1068.77.1USN-6917-1
linux-azure-fde-5.15Ubuntu
Fixed in:5.15.0-1068.77~20.04.1.1USN-6917-1
linux-gcpUbuntu
Fixed in:5.15.0-1064.72USN-6898-1
Fixed in:6.8.0-1010.11USN-6893-1
linux-gcp-5.15Ubuntu
Fixed in:5.15.0-1065.73~20.04.1USN-6927-1
linux-gkeUbuntu
Fixed in:5.15.0-1062.68USN-6898-1
Fixed in:6.8.0-1006.9USN-6893-2
linux-gkeopUbuntu
Fixed in:5.15.0-1048.55USN-6898-1
linux-gkeop-5.15Ubuntu
Fixed in:5.15.0-1048.55~20.04.1USN-6898-1
linux-hwe-5.15Ubuntu
Fixed in:5.15.0-116.126~20.04.1USN-6898-3
linux-ibmUbuntu
Fixed in:5.15.0-1058.61USN-6898-1
Fixed in:6.8.0-1008.8USN-6893-1
linux-ibm-5.15Ubuntu
Fixed in:5.15.0-1058.61~20.04.1USN-6898-2
linux-image-5.15.0-1035-xilinx-zynqmpUbuntu
Fixed in:5.15.0-1035.39USN-7019-1
linux-image-5.15.0-1048-gkeopUbuntu
Fixed in:5.15.0-1048.55~20.04.1USN-6898-1
Fixed in:5.15.0-1048.55USN-6898-1
linux-image-5.15.0-1058-ibmUbuntu
Fixed in:5.15.0-1058.61~20.04.1USN-6898-2
Fixed in:5.15.0-1058.61USN-6898-1
linux-image-5.15.0-1058-raspiUbuntu
Fixed in:5.15.0-1058.61USN-6919-1
linux-image-5.15.0-1060-intel-iotgUbuntu
Fixed in:5.15.0-1060.66~20.04.1USN-6898-1
Fixed in:5.15.0-1060.66USN-6898-1
linux-image-5.15.0-1060-nvidiaUbuntu
Fixed in:5.15.0-1060.61USN-6898-1
linux-image-5.15.0-1060-nvidia-lowlatencyUbuntu
Fixed in:5.15.0-1060.61USN-6898-1
linux-image-5.15.0-1062-gkeUbuntu
Fixed in:5.15.0-1062.68USN-6898-1
linux-image-5.15.0-1062-kvmUbuntu
Fixed in:5.15.0-1062.67USN-6898-1
linux-image-5.15.0-1063-oracleUbuntu
Fixed in:5.15.0-1063.69~20.04.1USN-6898-2
Fixed in:5.15.0-1063.69USN-6898-1
linux-image-5.15.0-1064-gcpUbuntu
Fixed in:5.15.0-1064.72USN-6898-1
linux-image-5.15.0-1065-awsUbuntu
Fixed in:5.15.0-1065.71~20.04.1USN-6898-4
Fixed in:5.15.0-1065.71USN-6898-3
linux-image-5.15.0-1065-gcpUbuntu
Fixed in:5.15.0-1065.73~20.04.1USN-6927-1
linux-image-5.15.0-1068-azureUbuntu
Fixed in:5.15.0-1068.77~20.04.1USN-6917-1
Fixed in:5.15.0-1068.77USN-6917-1

This vulnerability affects an unusually large number of packages. The highest-confidence fixes are shown above; the full list is longer. Check the referenced advisories for complete coverage.

TridentStack Control can deploy fixes like this automatically across your Windows, macOS, and Linux fleet. See how it works

Remediation is compiled from vendor and distribution security advisories. Always confirm against the linked source for your exact version and platform.

CVSS v3 Vector

Exploitability

Attack VectorNetwork
Attack ComplexityLow
Privileges RequiredLow
User InteractionNone
ScopeUnchanged

Impact

ConfidentialityLow
IntegrityLow
AvailabilityLow

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

Exploit Intelligence

0.50%probability of exploitation in 30 days
40thpercentile

Moderate risk: more likely to be exploited than 40% of all known CVEs.

References

Related Vulnerabilities

Other CWE-667 vulnerabilities, ordered by exploit likelihood. View all

CVESeverityCVSSEPSSExploitedFix
CVE-2019-10072High7.573%-Fix
CVE-2002-1850High7.517%-Fix
CVE-2009-2699High7.514%-Fix
CVE-2004-0174High7.512%--
CVE-2009-4272High7.511%--
CVE-2020-24606High8.65.2%-Fix

Common questions

How do I fix CVE-2024-35970?

Published advisories record a fix for 114 affected products. The "How to fix" section on this page lists the fixed version and source advisory for each one, so apply the entry matching what you actually run.

Is CVE-2024-35970 being actively exploited?

Not that we know of. CVE-2024-35970 is not in the CISA Known Exploited Vulnerabilities catalog. Its EPSS score of 0.50% is the estimated probability that it will be exploited in the next 30 days. That is higher than 40% of all scored CVEs.

How severe is CVE-2024-35970?

CVE-2024-35970 has a CVSS v3 base score of 6.3, rated medium. CVSS rates the technical impact if the vulnerability is exploited, not how likely that is, so weigh it alongside the exploit-prediction score when you decide what to patch first.

What does CVE-2024-35970 affect?

Published advisories record a fix for linux (Debian), linux (Ubuntu), linux-aws (Ubuntu), linux-aws-5.15 (Ubuntu), and 110 more. Only products with a sourced advisory are listed, so treat this as what we can cite rather than a complete inventory.

Embed a live status badge for CVE-2024-35970
CVE-2024-35970 severity badge

Markdown

[![CVE-2024-35970](https://tridentstack.com/cve/badge/CVE-2024-35970.svg)](https://tridentstack.com/cve/CVE-2024-35970)

HTML

<a href="https://tridentstack.com/cve/CVE-2024-35970"><img src="https://tridentstack.com/cve/badge/CVE-2024-35970.svg" alt="CVE-2024-35970"></a>

Find and fix vulnerabilities across your fleet

TridentStack Control continuously scans your Windows, macOS, and Linux fleet for known vulnerabilities, prioritizes them by severity and active exploitation, and patches them automatically.

See how it worksStart freeThis CVE lookup is free and always will be.

This product uses NVD data but is not endorsed or certified by the NVD. EPSS scores courtesy of FIRST.org (https://www.first.org/epss). Source: CISA KEV Catalog. Data as of 2025-04-04.