CVE-2021-47597
inet_diag: fix kernel-infoleak for UDP sockets
Mitigation
- Upgrade Linux to 71ddeac8cd1d217744a0e060ff520e147c9328d1 or later.
Who should check
- Anyone running Linux >= 3c4d05c8056724aff3abc20650807dd828fded54, < 7b5596e531253ce84213d9daa7120b71c9d83198; >= 3c4d05c8056724aff3abc20650807dd828fded54, < 3a4f6dba1eb98101abc012ef968a8b10dac1ce50; >= 3c4d05c8056724aff3abc20650807dd828fded54, < e5d28205bf1de7082d904ed277ceb2db2879e302; >= 3c4d05c8056724aff3abc20650807dd828fded54, < 71ddeac8cd1d217744a0e060ff520e147c9328d1
- Anyone running Linux 3.3
Vulnerability facts
- Affected
- Linux >= 3c4d05c8056724aff3abc20650807dd828fded54, < 7b5596e531253ce84213d9daa7120b71c9d83198; >= 3c4d05c8056724aff3abc20650807dd828fded54, < 3a4f6dba1eb98101abc012ef968a8b10dac1ce50; >= 3c4d05c8056724aff3abc20650807dd828fded54, < e5d28205bf1de7082d904ed277ceb2db2879e302; >= 3c4d05c8056724aff3abc20650807dd828fded54, < 71ddeac8cd1d217744a0e060ff520e147c9328d1; Linux 3.3
- Fixed in
- Linux 7b5596e531253ce84213d9daa7120b71c9d83198, Linux 3a4f6dba1eb98101abc012ef968a8b10dac1ce50, Linux 71ddeac8cd1d217744a0e060ff520e147c9328d1
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Not remotely exploitable (local or adjacent access needed)
- CVSS
- 5.5 (v3.1, NVD)CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:NOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Local
- Attack complexity: Low
- Privileges required: Low
- User interaction: None
- Scope: Unchanged
- Confidentiality impact: High
- Integrity impact: None
- Availability impact: None
- EPSS
- 0.31% chance of exploitation in 30 days (percentile 16, 2026-11-26)
- CWE
- CWE-908
- Modified
Description
In the Linux kernel, the following vulnerability has been resolved: inet_diag: fix kernel-infoleak for UDP sockets KMSAN reported a kernel-infoleak [1], that can exploited by unpriv users. After analysis it turned out UDP was not initializing r->idiag_expires. Other users of inet_sk_diag_fill() might make the same mistake in the future, so fix this in inet_sk_diag_fill(). [1] BUG: KMSAN: kernel-infoleak in instrument_copy_to_user include/linux/instrumented.h:121 [inline] BUG: KMSAN: kernel-infoleak in copyout lib/iov_iter.c:156 [inline] BUG: KMSAN: kernel-infoleak in _copy_to_iter+0x69d/0x25c0 lib/iov_iter.c:670 instrument_copy_to_user include/linux/instrumented.h:121 [inline] copyout lib/iov_iter.c:156 [inline] _copy_to_iter+0x69d/0x25c0 lib/iov_iter.c:670 copy_to_iter include/linux/uio.h:155 [inline] simple_copy_to_iter+0xf3/0x140 net/core/datagram.c:519 __skb_datagram_iter+0x2cb/0x1280 net/core/datagram.c:425 skb_copy_datagram_iter+0xdc/0x270 net/core/datagram.c:533 skb_copy_datagram_msg include/linux/skbuff.h:3657 [inline] netlink_recvmsg+0x660/0x1c60 net/netlink/af_netlink.c:1974 sock_recvmsg_nosec net/socket.c:944 [inline] sock_recvmsg net/socket.c:962 [inline] sock_read_iter+0x5a9/0x630 net/socket.c:1035 call_read_iter include/linux/fs.h:2156 [inline] new_sync_read fs/read_write.c:400 [inline] vfs_read+0x1631/0x1980 fs/read_write.c:481 ksys_read+0x28c/0x520 fs/read_write.c:619 __do_sys_read fs/read_write.c:629 [inline] __se_sys_read fs/read_write.c:627 [inline] __x64_sys_read+0xdb/0x120 fs/read_write.c:627 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x54/0xd0 arch/x86/entry/common.c:82 entry_SYSCALL_64_after_hwframe+0x44/0xae Uninit was created at: slab_post_alloc_hook mm/slab.h:524 [inline] slab_alloc_node mm/slub.c:3251 [inline] __kmalloc_node_track_caller+0xe0c/0x1510 mm/slub.c:4974 kmalloc_reserve net/core/skbuff.c:354 [inline] __alloc_skb+0x545/0xf90 net/core/skbuff.c:426 alloc_skb include/linux/skbuff.h:1126 [inline] netlink_dump+0x3d5/0x16a0 net/netlink/af_netlink.c:2245 __netlink_dump_start+0xd1c/0xee0 net/netlink/af_netlink.c:2370 netlink_dump_start include/linux/netlink.h:254 [inline] inet_diag_handler_cmd+0x2e7/0x400 net/ipv4/inet_diag.c:1343 sock_diag_rcv_msg+0x24a/0x620 netlink_rcv_skb+0x447/0x800 net/netlink/af_netlink.c:2491 sock_diag_rcv+0x63/0x80 net/core/sock_diag.c:276 netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline] netlink_unicast+0x1095/0x1360 net/netlink/af_netlink.c:1345 netlink_sendmsg+0x16f3/0x1870 net/netlink/af_netlink.c:1916 sock_sendmsg_nosec net/socket.c:704 [inline] sock_sendmsg net/socket.c:724 [inline] sock_write_iter+0x594/0x690 net/socket.c:1057 do_iter_readv_writev+0xa7f/0xc70 do_iter_write+0x52c/0x1500 fs/read_write.c:851 vfs_writev fs/read_write.c:924 [inline] do_writev+0x63f/0xe30 fs/read_write.c:967 __do_sys_writev fs/read_write.c:1040 [inline] __se_sys_writev fs/read_write.c:1037 [inline] __x64_sys_writev+0xe5/0x120 fs/read_write.c:1037 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x54/0xd0 arch/x86/entry/common.c:82 entry_SYSCALL_64_after_hwframe+0x44/0xae Bytes 68-71 of 312 are uninitialized Memory access of size 312 starts at ffff88812ab54000 Data copied to user address 0000000020001440 CPU: 1 PID: 6365 Comm: syz-executor801 Not tainted 5.16.0-rc3-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| Linux | >= 3c4d05c8056724aff3abc20650807dd828fded54, < 7b5596e531253ce84213d9daa7120b71c9d83198; >= 3c4d05c8056724aff3abc20650807dd828fded54, < 3a4f6dba1eb98101abc012ef968a8b10dac1ce50; >= 3c4d05c8056724aff3abc20650807dd828fded54, < e5d28205bf1de7082d904ed277ceb2db2879e302; >= 3c4d05c8056724aff3abc20650807dd828fded54, < 71ddeac8cd1d217744a0e060ff520e147c9328d1 | — | cvelist |
| Linux | 3.3 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2021-47597. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2021-47597.md Affected: Linux >= 3c4d05c8056724aff3abc20650807dd828fded54, < 7b5596e531253ce84213d9daa7120b71c9d83198; >= 3c4d05c8056724aff3abc20650807dd828fded54, < 3a4f6dba1eb98101abc012ef968a8b10dac1ce50; >= 3c4d05c8056724aff3abc20650807dd828fded54, < e5d28205bf1de7082d904ed277ceb2db2879e302; >= 3c4d05c8056724aff3abc20… Fixed in: Linux 7b5596e531253ce84213d9daa7120b71c9d83198, Linux 3a4f6dba1eb98101abc012ef968a8b10dac1ce50, Linux 71ddeac8cd1d217744a0e060ff520e147c9328d1 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.
References
FAQ
Is CVE-2021-47597 being exploited?
There is no confirmed exploitation: CVE-2021-47597 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.31% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2021-47597?
Medium: CVSS 5.5 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).
Which versions are affected by CVE-2021-47597?
Linux >= 3c4d05c8056724aff3abc20650807dd828fded54, < 7b5596e531253ce84213d9daa7120b71c9d83198; >= 3c4d05c8056724aff3abc20650807dd828fded54, < 3a4f6dba1eb98101abc012ef968a8b10dac1ce50; >= 3c4d05c8056724aff3abc20650807dd828fded54, < e5d28205bf1de7082d904ed277ceb2db2879e302; >= 3c4d05c8056724aff3abc20650807dd828fded54, < 71ddeac8cd1d217744a0e060ff520e147c9328d1; Linux 3.3.
Is there a fix for CVE-2021-47597?
Yes. Fixed in Linux 7b5596e531253ce84213d9daa7120b71c9d83198, Linux 3a4f6dba1eb98101abc012ef968a8b10dac1ce50, Linux 71ddeac8cd1d217744a0e060ff520e147c9328d1. Upgrade Linux to 71ddeac8cd1d217744a0e060ff520e147c9328d1 or later.
How do I check if I'm affected by CVE-2021-47597?
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.