CVE-2024-42106: Vulnerability in Linux Linux
In the Linux kernel, the following vulnerability has been resolved: inet_diag: Initialize pad field in struct inet_diag_req_v2 KMSAN reported uninit-value access in raw_lookup() [1]. Diag for raw sockets uses the pad field in struct inet_diag_req_v2 for the underlying protocol. This field corresponds to the sdiag_raw_protocol field in struct inet_diag_req_raw. inet_diag_get_exact_compat() converts inet_diag_req to inet_diag_req_v2, but leaves the pad field uninitialized. So the issue occurs when raw_lookup() accesses the sdiag_raw_protocol field. Fix this by initializing the pad field in inet_diag_get_exact_compat(). Also, do the same fix in inet_diag_dump_compat() to avoid the similar issue in the future. [1] BUG: KMSAN: uninit-value in raw_lookup net/ipv4/raw_diag.c:49 [inline] BUG: KMSAN: uninit-value in raw_sock_get+0x657/0x800 net/ipv4/raw_diag.c:71 raw_lookup net/ipv4/raw_diag.c:49 [inline] raw_sock_get+0x657/0x800 net/ipv4/raw_diag.c:71 raw_diag_dump_one+0xa1/0x660 net/ipv4/raw_diag.c:99 inet_diag_cmd_exact+0x7d9/0x980 inet_diag_get_exact_compat net/ipv4/inet_diag.c:1404 [inline] inet_diag_rcv_msg_compat+0x469/0x530 net/ipv4/inet_diag.c:1426 sock_diag_rcv_msg+0x23d/0x740 net/core/sock_diag.c:282 netlink_rcv_skb+0x537/0x670 net/netlink/af_netlink.c:2564 sock_diag_rcv+0x35/0x40 net/core/sock_diag.c:297 netlink_unicast_kernel net/netlink/af_netlink.c:1335 [inline] netlink_unicast+0xe74/0x1240 net/netlink/af_netlink.c:1361 netlink_sendmsg+0x10c6/0x1260 net/netlink/af_netlink.c:1905 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg+0x332/0x3d0 net/socket.c:745 ____sys_sendmsg+0x7f0/0xb70 net/socket.c:2585 ___sys_sendmsg+0x271/0x3b0 net/socket.c:2639 __sys_sendmsg net/socket.c:2668 [inline] __do_sys_sendmsg net/socket.c:2677 [inline] __se_sys_sendmsg net/socket.c:2675 [inline] __x64_sys_sendmsg+0x27e/0x4a0 net/socket.c:2675 x64_sys_call+0x135e/0x3ce0 arch/x86/include/generated/asm/syscalls_64.h:47 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xd9/0x1e0 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f Uninit was stored to memory at: raw_sock_get+0x650/0x800 net/ipv4/raw_diag.c:71 raw_diag_dump_one+0xa1/0x660 net/ipv4/raw_diag.c:99 inet_diag_cmd_exact+0x7d9/0x980 inet_diag_get_exact_compat net/ipv4/inet_diag.c:1404 [inline] inet_diag_rcv_msg_compat+0x469/0x530 net/ipv4/inet_diag.c:1426 sock_diag_rcv_msg+0x23d/0x740 net/core/sock_diag.c:282 netlink_rcv_skb+0x537/0x670 net/netlink/af_netlink.c:2564 sock_diag_rcv+0x35/0x40 net/core/sock_diag.c:297 netlink_unicast_kernel net/netlink/af_netlink.c:1335 [inline] netlink_unicast+0xe74/0x1240 net/netlink/af_netlink.c:1361 netlink_sendmsg+0x10c6/0x1260 net/netlink/af_netlink.c:1905 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg+0x332/0x3d0 net/socket.c:745 ____sys_sendmsg+0x7f0/0xb70 net/socket.c:2585 ___sys_sendmsg+0x271/0x3b0 net/socket.c:2639 __sys_sendmsg net/socket.c:2668 [inline] __do_sys_sendmsg net/socket.c:2677 [inline] __se_sys_sendmsg net/socket.c:2675 [inline] __x64_sys_sendmsg+0x27e/0x4a0 net/socket.c:2675 x64_sys_call+0x135e/0x3ce0 arch/x86/include/generated/asm/syscalls_64.h:47 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xd9/0x1e0 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f Local variable req.i created at: inet_diag_get_exact_compat net/ipv4/inet_diag.c:1396 [inline] inet_diag_rcv_msg_compat+0x2a6/0x530 net/ipv4/inet_diag.c:1426 sock_diag_rcv_msg+0x23d/0x740 net/core/sock_diag.c:282 CPU: 1 PID: 8888 Comm: syz-executor.6 Not tainted 6.10.0-rc4-00217-g35bb670d65fc #32 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-2.fc40 04/01/2014
AI Analysis
Technical Summary
CVE-2024-42106 is a vulnerability identified in the Linux kernel related to the inet_diag subsystem, specifically involving the handling of raw sockets diagnostics. The issue arises from the improper initialization of the 'pad' field within the 'inet_diag_req_v2' structure. This field corresponds to the 'sdiag_raw_protocol' in the 'inet_diag_req_raw' structure. The vulnerability is triggered because the function 'inet_diag_get_exact_compat()' converts an 'inet_diag_req' to 'inet_diag_req_v2' but fails to initialize the 'pad' field. Consequently, when the 'raw_lookup()' function accesses the 'sdiag_raw_protocol' field, it reads an uninitialized value. This uninitialized memory access was detected by Kernel Memory Sanitizer (KMSAN), which flagged it as a bug due to the use of uninitialized values in kernel code. The problem also exists in 'inet_diag_dump_compat()', which was similarly fixed to prevent future occurrences. The vulnerability is local, as it involves kernel-level socket diagnostic operations, and the bug trace indicates it can be triggered via netlink socket messages related to raw socket diagnostics. While no known exploits are reported in the wild, the flaw could potentially lead to undefined behavior or kernel crashes due to the use of uninitialized memory, which might be leveraged for privilege escalation or denial of service under certain conditions. The fix involves explicitly initializing the 'pad' field in the relevant conversion functions to ensure no uninitialized memory is accessed during diagnostic operations on raw sockets.
Potential Impact
For European organizations, this vulnerability poses a risk primarily to systems running vulnerable versions of the Linux kernel, which is widely used across servers, cloud infrastructure, and embedded devices. The impact includes potential kernel instability or crashes caused by uninitialized memory access, which could lead to denial of service conditions. Although no direct remote exploitation vector is evident, local attackers or malicious processes with access to raw socket diagnostic interfaces could exploit this flaw to cause system disruptions or potentially escalate privileges if combined with other vulnerabilities. Given the prevalence of Linux in critical infrastructure, telecommunications, financial services, and government systems across Europe, exploitation could disrupt essential services or compromise system integrity. The vulnerability's exploitation complexity is moderate since it requires local access and specific interaction with netlink socket diagnostics. However, the widespread deployment of Linux and the critical nature of affected systems amplify the potential operational impact. Additionally, the vulnerability could be leveraged in multi-stage attacks targeting kernel-level control, making it a concern for organizations with high security requirements.
Mitigation Recommendations
European organizations should prioritize updating their Linux kernel to versions that include the patch for CVE-2024-42106 as soon as they become available. Until patches are applied, organizations can mitigate risk by restricting access to raw socket diagnostic interfaces and limiting local user privileges to prevent unauthorized interactions with netlink sockets. Employing kernel hardening techniques such as SELinux or AppArmor policies to restrict socket diagnostic operations can reduce exploitation likelihood. Monitoring system logs for unusual netlink socket activity or kernel warnings related to uninitialized memory access can help detect attempted exploitation. For environments where immediate patching is not feasible, consider isolating critical Linux systems from untrusted users and processes, and enforce strict access controls on diagnostic tools and interfaces. Regularly auditing kernel versions and applying security updates promptly is essential. Additionally, organizations should maintain robust incident response plans to quickly address potential kernel-level compromises.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Finland, Italy, Spain
CVE-2024-42106: Vulnerability in Linux Linux
Description
In the Linux kernel, the following vulnerability has been resolved: inet_diag: Initialize pad field in struct inet_diag_req_v2 KMSAN reported uninit-value access in raw_lookup() [1]. Diag for raw sockets uses the pad field in struct inet_diag_req_v2 for the underlying protocol. This field corresponds to the sdiag_raw_protocol field in struct inet_diag_req_raw. inet_diag_get_exact_compat() converts inet_diag_req to inet_diag_req_v2, but leaves the pad field uninitialized. So the issue occurs when raw_lookup() accesses the sdiag_raw_protocol field. Fix this by initializing the pad field in inet_diag_get_exact_compat(). Also, do the same fix in inet_diag_dump_compat() to avoid the similar issue in the future. [1] BUG: KMSAN: uninit-value in raw_lookup net/ipv4/raw_diag.c:49 [inline] BUG: KMSAN: uninit-value in raw_sock_get+0x657/0x800 net/ipv4/raw_diag.c:71 raw_lookup net/ipv4/raw_diag.c:49 [inline] raw_sock_get+0x657/0x800 net/ipv4/raw_diag.c:71 raw_diag_dump_one+0xa1/0x660 net/ipv4/raw_diag.c:99 inet_diag_cmd_exact+0x7d9/0x980 inet_diag_get_exact_compat net/ipv4/inet_diag.c:1404 [inline] inet_diag_rcv_msg_compat+0x469/0x530 net/ipv4/inet_diag.c:1426 sock_diag_rcv_msg+0x23d/0x740 net/core/sock_diag.c:282 netlink_rcv_skb+0x537/0x670 net/netlink/af_netlink.c:2564 sock_diag_rcv+0x35/0x40 net/core/sock_diag.c:297 netlink_unicast_kernel net/netlink/af_netlink.c:1335 [inline] netlink_unicast+0xe74/0x1240 net/netlink/af_netlink.c:1361 netlink_sendmsg+0x10c6/0x1260 net/netlink/af_netlink.c:1905 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg+0x332/0x3d0 net/socket.c:745 ____sys_sendmsg+0x7f0/0xb70 net/socket.c:2585 ___sys_sendmsg+0x271/0x3b0 net/socket.c:2639 __sys_sendmsg net/socket.c:2668 [inline] __do_sys_sendmsg net/socket.c:2677 [inline] __se_sys_sendmsg net/socket.c:2675 [inline] __x64_sys_sendmsg+0x27e/0x4a0 net/socket.c:2675 x64_sys_call+0x135e/0x3ce0 arch/x86/include/generated/asm/syscalls_64.h:47 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xd9/0x1e0 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f Uninit was stored to memory at: raw_sock_get+0x650/0x800 net/ipv4/raw_diag.c:71 raw_diag_dump_one+0xa1/0x660 net/ipv4/raw_diag.c:99 inet_diag_cmd_exact+0x7d9/0x980 inet_diag_get_exact_compat net/ipv4/inet_diag.c:1404 [inline] inet_diag_rcv_msg_compat+0x469/0x530 net/ipv4/inet_diag.c:1426 sock_diag_rcv_msg+0x23d/0x740 net/core/sock_diag.c:282 netlink_rcv_skb+0x537/0x670 net/netlink/af_netlink.c:2564 sock_diag_rcv+0x35/0x40 net/core/sock_diag.c:297 netlink_unicast_kernel net/netlink/af_netlink.c:1335 [inline] netlink_unicast+0xe74/0x1240 net/netlink/af_netlink.c:1361 netlink_sendmsg+0x10c6/0x1260 net/netlink/af_netlink.c:1905 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg+0x332/0x3d0 net/socket.c:745 ____sys_sendmsg+0x7f0/0xb70 net/socket.c:2585 ___sys_sendmsg+0x271/0x3b0 net/socket.c:2639 __sys_sendmsg net/socket.c:2668 [inline] __do_sys_sendmsg net/socket.c:2677 [inline] __se_sys_sendmsg net/socket.c:2675 [inline] __x64_sys_sendmsg+0x27e/0x4a0 net/socket.c:2675 x64_sys_call+0x135e/0x3ce0 arch/x86/include/generated/asm/syscalls_64.h:47 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xd9/0x1e0 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f Local variable req.i created at: inet_diag_get_exact_compat net/ipv4/inet_diag.c:1396 [inline] inet_diag_rcv_msg_compat+0x2a6/0x530 net/ipv4/inet_diag.c:1426 sock_diag_rcv_msg+0x23d/0x740 net/core/sock_diag.c:282 CPU: 1 PID: 8888 Comm: syz-executor.6 Not tainted 6.10.0-rc4-00217-g35bb670d65fc #32 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-2.fc40 04/01/2014
AI-Powered Analysis
Technical Analysis
CVE-2024-42106 is a vulnerability identified in the Linux kernel related to the inet_diag subsystem, specifically involving the handling of raw sockets diagnostics. The issue arises from the improper initialization of the 'pad' field within the 'inet_diag_req_v2' structure. This field corresponds to the 'sdiag_raw_protocol' in the 'inet_diag_req_raw' structure. The vulnerability is triggered because the function 'inet_diag_get_exact_compat()' converts an 'inet_diag_req' to 'inet_diag_req_v2' but fails to initialize the 'pad' field. Consequently, when the 'raw_lookup()' function accesses the 'sdiag_raw_protocol' field, it reads an uninitialized value. This uninitialized memory access was detected by Kernel Memory Sanitizer (KMSAN), which flagged it as a bug due to the use of uninitialized values in kernel code. The problem also exists in 'inet_diag_dump_compat()', which was similarly fixed to prevent future occurrences. The vulnerability is local, as it involves kernel-level socket diagnostic operations, and the bug trace indicates it can be triggered via netlink socket messages related to raw socket diagnostics. While no known exploits are reported in the wild, the flaw could potentially lead to undefined behavior or kernel crashes due to the use of uninitialized memory, which might be leveraged for privilege escalation or denial of service under certain conditions. The fix involves explicitly initializing the 'pad' field in the relevant conversion functions to ensure no uninitialized memory is accessed during diagnostic operations on raw sockets.
Potential Impact
For European organizations, this vulnerability poses a risk primarily to systems running vulnerable versions of the Linux kernel, which is widely used across servers, cloud infrastructure, and embedded devices. The impact includes potential kernel instability or crashes caused by uninitialized memory access, which could lead to denial of service conditions. Although no direct remote exploitation vector is evident, local attackers or malicious processes with access to raw socket diagnostic interfaces could exploit this flaw to cause system disruptions or potentially escalate privileges if combined with other vulnerabilities. Given the prevalence of Linux in critical infrastructure, telecommunications, financial services, and government systems across Europe, exploitation could disrupt essential services or compromise system integrity. The vulnerability's exploitation complexity is moderate since it requires local access and specific interaction with netlink socket diagnostics. However, the widespread deployment of Linux and the critical nature of affected systems amplify the potential operational impact. Additionally, the vulnerability could be leveraged in multi-stage attacks targeting kernel-level control, making it a concern for organizations with high security requirements.
Mitigation Recommendations
European organizations should prioritize updating their Linux kernel to versions that include the patch for CVE-2024-42106 as soon as they become available. Until patches are applied, organizations can mitigate risk by restricting access to raw socket diagnostic interfaces and limiting local user privileges to prevent unauthorized interactions with netlink sockets. Employing kernel hardening techniques such as SELinux or AppArmor policies to restrict socket diagnostic operations can reduce exploitation likelihood. Monitoring system logs for unusual netlink socket activity or kernel warnings related to uninitialized memory access can help detect attempted exploitation. For environments where immediate patching is not feasible, consider isolating critical Linux systems from untrusted users and processes, and enforce strict access controls on diagnostic tools and interfaces. Regularly auditing kernel versions and applying security updates promptly is essential. Additionally, organizations should maintain robust incident response plans to quickly address potential kernel-level compromises.
Affected Countries
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- Linux
- Date Reserved
- 2024-07-29T15:50:41.175Z
- Cisa Enriched
- true
- Cvss Version
- null
- State
- PUBLISHED
Threat ID: 682d9827c4522896dcbe1aa6
Added to database: 5/21/2025, 9:08:55 AM
Last enriched: 6/29/2025, 5:24:51 AM
Last updated: 8/13/2025, 10:14:38 PM
Views: 14
Related Threats
CVE-2025-53948: CWE-415 Double Free in Santesoft Sante PACS Server
HighCVE-2025-52584: CWE-122 Heap-based Buffer Overflow in Ashlar-Vellum Cobalt
HighCVE-2025-46269: CWE-122 Heap-based Buffer Overflow in Ashlar-Vellum Cobalt
HighCVE-2025-54862: CWE-79 Improper Neutralization of Input During Web Page Generation (XSS or 'Cross-site Scripting') in Santesoft Sante PACS Server
MediumCVE-2025-54759: CWE-79 Improper Neutralization of Input During Web Page Generation (XSS or 'Cross-site Scripting') in Santesoft Sante PACS Server
MediumActions
Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.
External Links
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.