# CVE-2024-42106: inet\_diag: Initialize pad field in struct inet\_diag\_req\_v2

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.32% (percentile 18, 2026-11-28)
- **CWE:** CWE-908
- **Published:** 2024-07-30T07:46:01.865Z
- **Modified:** 2026-10-15T01:18:43.743Z

## Who should check

- Anyone running Linux \>= 432490f9d455fb842d70219f22d9d2c812371676, \< 7094a5fd20ab66028f1da7f06e0f2692d70346f9; \>= 432490f9d455fb842d70219f22d9d2c812371676, \< 0184bf0a349f4cf9e663abbe862ff280e8e4dfa2; \>= 432490f9d455fb842d70219f22d9d2c812371676, \< 7ef519c8efde152e0d632337f2994f6921e0b7e4; \>= 432490f9d455fb842d70219f22d9d2c812371676, \< 8366720519ea8d322a20780debdfd23d9fc0904a; \>= 432490f9d455fb842d70219f22d9d2c812371676, \< d6f487e0704de2f2d15f8dd5d7d723210f2b2fdb; \>= 432490f9d455fb842d70219f22d9d2c812371676, \< 76965648fe6858db7c5f3c700fef7aa5f124ca1c; \>= 432490f9d455fb842d70219f22d9d2c812371676, \< f9b2010e8af49fac9d9562146fb81744d8a9b051; \>= 432490f9d455fb842d70219f22d9d2c812371676, \< 61cf1c739f08190a4cbf047b9fbb192a94d87e3f
- Anyone running Linux 4.10

## 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

## Affected and fixed versions

- Linux: \>= 432490f9d455fb842d70219f22d9d2c812371676, \< 7094a5fd20ab66028f1da7f06e0f2692d70346f9; \>= 432490f9d455fb842d70219f22d9d2c812371676, \< 0184bf0a349f4cf9e663abbe862ff280e8e4dfa2; \>= 432490f9d455fb842d70219f22d9d2c812371676, \< 7ef519c8efde152e0d632337f2994f6921e0b7e4; \>= 432490f9d455fb842d70219f22d9d2c812371676, \< 8366720519ea8d322a20780debdfd23d9fc0904a; \>= 432490f9d455fb842d70219f22d9d2c812371676, \< d6f487e0704de2f2d15f8dd5d7d723210f2b2fdb; \>= 432490f9d455fb842d70219f22d9d2c812371676, \< 76965648fe6858db7c5f3c700fef7aa5f124ca1c; \>= 432490f9d455fb842d70219f22d9d2c812371676, \< f9b2010e8af49fac9d9562146fb81744d8a9b051; \>= 432490f9d455fb842d70219f22d9d2c812371676, \< 61cf1c739f08190a4cbf047b9fbb192a94d87e3f (cvelist)
- Linux: 4.10 (cvelist)

## Mitigation

- Upgrade Linux to 61cf1c739f08190a4cbf047b9fbb192a94d87e3f or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2024-42106. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-42106.md
Affected: Linux >= 432490f9d455fb842d70219f22d9d2c812371676, < 7094a5fd20ab66028f1da7f06e0f2692d70346f9; >= 432490f9d455fb842d70219f22d9d2c812371676, < 0184bf0a349f4cf9e663abbe862ff280e8e4dfa2; >= 432490f9d455fb842d70219f22d9d2c812371676, < 7ef519c8efde152e0d632337f2994f6921e0b7e4; >= 432490f9d455fb842d70219…
Fixed in: Linux 7094a5fd20ab66028f1da7f06e0f2692d70346f9, Linux 0184bf0a349f4cf9e663abbe862ff280e8e4dfa2, Linux 7ef519c8efde152e0d632337f2994f6921e0b7e4, Linux 8366720519ea8d322a20780debdfd23d9fc0904a, Linux 76965648fe6858db7c5f3c700fef7aa5f124ca1c, Linux 61cf1c739f08190a4cbf047b9fbb192a94d87e3f

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2024-42106 being exploited?

There is no confirmed exploitation: CVE-2024-42106 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.32% chance of exploitation in the next 30 days (as of 2026-11-28).

### How serious is CVE-2024-42106?

Medium: CVSS 5.5 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2024-42106?

Linux \>= 432490f9d455fb842d70219f22d9d2c812371676, \< 7094a5fd20ab66028f1da7f06e0f2692d70346f9; \>= 432490f9d455fb842d70219f22d9d2c812371676, \< 0184bf0a349f4cf9e663abbe862ff280e8e4dfa2; \>= 432490f9d455fb842d70219f22d9d2c812371676, \< 7ef519c8efde152e0d632337f2994f6921e0b7e4; \>= 432490f9d455fb842d70219f22d9d2c812371676, \< 8366720519ea8d322a20780debdfd23d9fc0904a; \>= 432490f9d455fb842d70219f22d9d2c812371676, \< d6f487e0704de2f2d15f8dd5d7d723210f2b2fdb; \>= 432490f9d455fb842d70219f22d9d2c812371676, \< 76965648fe6858db7c5f3c700fef7aa5f124ca1c; \>= 432490f9d455fb842d70219f22d9d2c812371676, \< f9b2010e8af49fac9d9562146fb81744d8a9b051; \>= 432490f9d455fb842d70219f22d9d2c812371676, \< 61cf1c739f08190a4cbf047b9fbb192a94d87e3f; Linux 4.10.

### Is there a fix for CVE-2024-42106?

Yes. Fixed in Linux 7094a5fd20ab66028f1da7f06e0f2692d70346f9, Linux 0184bf0a349f4cf9e663abbe862ff280e8e4dfa2, Linux 7ef519c8efde152e0d632337f2994f6921e0b7e4, Linux 8366720519ea8d322a20780debdfd23d9fc0904a, Linux 76965648fe6858db7c5f3c700fef7aa5f124ca1c, Linux 61cf1c739f08190a4cbf047b9fbb192a94d87e3f. Upgrade Linux to 61cf1c739f08190a4cbf047b9fbb192a94d87e3f or later.

### How do I check if I'm affected by CVE-2024-42106?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/7094a5fd20ab66028f1da7f06e0f2692d70346f9>
- patch: <https://git.kernel.org/stable/c/0184bf0a349f4cf9e663abbe862ff280e8e4dfa2>
- patch: <https://git.kernel.org/stable/c/7ef519c8efde152e0d632337f2994f6921e0b7e4>
- patch: <https://git.kernel.org/stable/c/8366720519ea8d322a20780debdfd23d9fc0904a>
- patch: <https://git.kernel.org/stable/c/d6f487e0704de2f2d15f8dd5d7d723210f2b2fdb>
- patch: <https://git.kernel.org/stable/c/76965648fe6858db7c5f3c700fef7aa5f124ca1c>
- patch: <https://git.kernel.org/stable/c/f9b2010e8af49fac9d9562146fb81744d8a9b051>
- patch: <https://git.kernel.org/stable/c/61cf1c739f08190a4cbf047b9fbb192a94d87e3f>
- other: <https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-398330.html>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-613116.html>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2024-42106>

HTML: <https://flawdb.com/CVE-2024-42106> · JSON: <https://flawdb.com/api/v1/entries/CVE-2024-42106>
