CVE-2024-38616·Kernel vulnerability
In the Linux kernel, the following vulnerability has been resolved: wifi: carl9170: re-fix fortified-memset warning The carl9170_tx_release() function sometimes triggers a fortified-memset warning in my randconfig builds: In file included from include/linux/string.h:254, from drivers/net/wireless/ath/carl9170/tx.c:40: In function 'fortify_memset_chk', inlined from 'carl9170_tx_release' at drivers/net/wireless/ath/carl9170/tx.c:283:2, inlined from 'kref_put' at include/linux/kref.h:65:3, inlined from 'carl9170_tx_put_skb' at drivers/net/wireless/ath/carl9170/tx.c:342:9: include/linux/fortify-string.h:493:25: error: call to '__write_overflow_field' declared with attribute warning: detected write beyond size of field (1st parameter); maybe use struct_group()? [-Werror=attribute-warning] 493 | __write_overflow_field(p_size_field, size); Kees previously tried to avoid this by using memset_after(), but it seems this does not fully address the problem. I noticed that the memset_after() here is done on a different part of the union (status) than the original cast was from (rate_driver_data), which may confuse the compiler. Unfortunately, the memset_after() trick does not work on driver_rates[] because that is part of an anonymous struct, and I could not get struct_group() to do this either. Using two separate memset() calls on the two members does address the warning though.
- Severity
- high
- Software
- Kernel
- Fixed in
- 6.9.3
- Published
- 2024-06-19
Affected versions
From: 6.9
Until: 6.9.3
Fixed in: 6.9.3
How to fix this CVE
Update the Linux kernel to version 6.9.3 or later to resolve this vulnerability. The issue stems from a memory sanitization routine in the carl9170 WiFi driver that triggered compiler warnings due to improper handling of union members during buffer clearing. Apply the patch through your distribution's kernel update mechanism to ensure the corrected memset operations are in place.
sudo dnf update kernel kernel-develDefensia detects this vulnerability
How to check if you are affected
- Step 1: Check your kernel version with `uname -r` and compare against 6.9.3 (vulnerable if 6.9.0, 6.9.1, 6.9.2, or 6.9.3 with this specific driver issue)
- Step 2: Verify if carl9170 WiFi driver is loaded by running `lsmod | grep carl9170`
- Step 3: Check kernel logs for buffer overflow warnings or memset-related compiler warnings using `dmesg | grep -i 'memset\|fortify\|overflow'`
- Step 4: After updating, confirm the new kernel version with `uname -r` and verify it is 6.9.3 or later
FAQ
What is CVE-2024-38616?
CVE-2024-38616 is a kernel vulnerability in the carl9170 WiFi driver where improper memory clearing operations trigger fortified-memset compiler warnings and potential buffer overflow conditions. The vulnerability affects the tx.c module's transmission release function when handling driver rate data structures.
Is CVE-2024-38616 being actively exploited?
No, this vulnerability is not listed as actively exploited by CISA, and no public exploits are currently available. The issue is primarily a kernel hardening concern rather than an actively weaponized threat.
What versions of Kernel are affected by CVE-2024-38616?
Kernel versions 6.9.0 through 6.9.3 are affected. The vulnerability was resolved in kernel 6.9.3 with corrected memset operations in the carl9170 driver.
How do I check if my server is vulnerable to CVE-2024-38616?
Run `uname -r` to check your kernel version; if it shows 6.9.0, 6.9.1, or 6.9.2, you are vulnerable. For 6.9.3, verify the patch was applied by checking `grep -r 'memset_after\|driver_rates' /lib/modules/$(uname -r)/kernel/drivers/net/wireless/ath/carl9170/` or review kernel release notes.
Does Defensia detect CVE-2024-38616?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If the Linux kernel is installed on a monitored server, CVE-2024-38616 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
- https://git.kernel.org/stable/c/042a39bb8e0812466327a5102606e88a5a4f8c02
- https://git.kernel.org/stable/c/066afafc10c9476ee36c47c9062527a17e763901
- https://git.kernel.org/stable/c/0c38c9c460bb8ce8d6f6cf316e0d71a70983ec83
- https://git.kernel.org/stable/c/13857683126e8a6492af73c74d702835f7a2175b
- https://git.kernel.org/stable/c/87586467098281f04fa93e59fe3a516b954bddc4
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2024-38616. Free for 1 server.
Get started free