CVE-2024-38596: af_unix: Fix data races in unix_release_sock/unix_stream_sendmsg

Published Jun 19, 2024
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

afunix: Fix data races in unixreleasesock/unixstreamsendmsg

A data-race condition has been identified in afunix. In one data path, the write function unixreleasesock() atomically writes to sk->skshutdown using WRITEONCE. However, on the reader side, unixstreamsendmsg() does not read it atomically. Consequently, this issue is causing the following KCSAN splat to occur:

BUG: KCSAN: data-race in unixreleasesock / unixstreamsendmsg

write (marked) to 0xffff88867256ddbb of 1 bytes by task 7270 on cpu 28: unixreleasesock (net/unix/afunix.c:640) unixrelease (net/unix/afunix.c:1050) sockclose (net/socket.c:659 net/socket.c:1421) fput (fs/filetable.c:422) fputsync (fs/filetable.c:508) sesysclose (fs/open.c:1559 fs/open.c:1541) x64sysclose (fs/open.c:1541) x64syscall (arch/x86/entry/syscall64.c:33) dosyscall64 (arch/x86/entry/common.c:?) entrySYSCALL64afterhwframe (arch/x86/entry/entry64.S:130)

read to 0xffff88867256ddbb of 1 bytes by task 989 on cpu 14: unixstreamsendmsg (net/unix/afunix.c:2273) socksendmsg (net/socket.c:730 net/socket.c:745) syssendmsg (net/socket.c:2584) syssendmmsg (net/socket.c:2638 net/socket.c:2724) x64syssendmmsg (net/socket.c:2753 net/socket.c:2750 net/socket.c:2750) x64syscall (arch/x86/entry/syscall64.c:33) dosyscall64 (arch/x86/entry/common.c:?) entrySYSCALL64afterhwframe (arch/x86/entry/entry64.S:130)

value changed: 0x01 -> 0x03

The line numbers are related to commit dd5a440a31fa ("Linux 6.9-rc7").

Commit e1d09c2c2f57 ("afunix: Fix data races around sk->skshutdown.") addressed a comparable issue in the past regarding sk->skshutdown. However, it overlooked resolving this particular data path. This patch only offending unixstreamsendmsg() function, since the other reads seem to be protected by unixstatelock() as discussed in

Other sources

In the Linux kernel, the following vulnerability has been resolved:

afunix: Fix data races in unixreleasesock/unixstreamsendmsg

The Linux kernel CVE team has assigned CVE-2024-38596 to this issue.

Upstream advisory: https://lore.kernel.org/linux-cve-announce/2024061956-CVE-2024-38596-f660@gregkh/T

Red Hat

Linux Kernel is vulnerable to a denial of service, caused by a race condition in unixreleasesock/unixstreamsendmsg. A local authenticated attacker could exploit this vulnerability to cause a denial of service.

IBM

Affected Software

27 affected componentsFixes available
redhat/kernel<4.19.316
4.19.316
redhat/kernel<5.4.278
5.4.278
redhat/kernel<5.10.219
5.10.219
redhat/kernel<5.15.161
5.15.161
redhat/kernel<6.1.93
6.1.93
redhat/kernel<6.6.33
6.6.33
redhat/kernel<6.8.12
6.8.12
redhat/kernel<6.9.3
6.9.3
redhat/kernel<6.10
6.10
IBM Security Verify Governance<=ISVG 10.0.2
IBM Security Verify Governance, Identity Manager Software Stack<=ISVG 10.0.2
IBM Security Verify Governance, Identity Manager Virtual Appliance<=ISVG 10.0.2
IBM Security Verify Governance Identity Manager Container<=ISVG 10.0.2
debian/linux
5.10.223-15.10.234-16.1.129-16.1.135-16.12.25-16.12.27-1
Linux Linux kernel>=2.6.13<4.19.316
Linux Linux kernel>=4.20<5.4.278
Linux Linux kernel>=5.5<5.10.219
Linux Linux kernel>=5.11<5.15.161
Linux Linux kernel>=5.16<6.1.93
Linux Linux kernel>=6.2<6.6.33
Linux Linux kernel>=6.7<6.8.12
Linux Linux kernel>=6.9<6.9.3
Linux Linux kernel=2.6.12
Linux Linux kernel=2.6.12-rc2
Linux Linux kernel=2.6.12-rc3
Linux Linux kernel=2.6.12-rc4
Linux Linux kernel=2.6.12-rc5

Event History

Jun 19, 2024
CVE Published
via MITRE·01:45 PM
Data Sourced
via MITRE·01:45 PM
Description
Data Sourced
via NVD·02:15 PM
Description
Data Sourced
via NVD·02:15 PM
RemedySeverityWeaknessAffected Software
Aug 8, 2024
Data Sourced
via Launchpad·11:30 PM
Description
Apr 27, 2025
Data Sourced
via Ubuntu·12:31 AM
RemedyDescriptionSeverityAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2024-38596?

CVE-2024-38596 has been classified as medium severity due to the potential for data races in the Linux kernel.

2

How do I fix CVE-2024-38596?

To fix CVE-2024-38596, upgrade the kernel to a version that is 4.19.316 or later, 5.4.278 or later, 5.10.219 or later, 5.15.161 or later, 6.1.93 or later, or 6.6.33 or later.

3

What systems are affected by CVE-2024-38596?

CVE-2024-38596 affects various Linux kernel versions, primarily those under Red Hat and Debian distributions.

4

Was CVE-2024-38596 publicly disclosed?

Yes, CVE-2024-38596 was publicly disclosed and is documented in security advisories related to the Linux kernel.

5

Can CVE-2024-38596 lead to system crashes?

Yes, if exploited, CVE-2024-38596 could potentially lead to system instability or crashes due to the identified data race condition.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203