CVE-2023-54218
net: Fix load-tearing on sk->sk_stamp in sock_recv_cmsgs().
Check your servers for CVE-2023-54218
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2023-54218 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
Description
In the Linux kernel, the following vulnerability has been resolved:
net: Fix load-tearing on sk->sk_stamp in sock_recv_cmsgs().
KCSAN found a data race in sock_recv_cmsgs() where the read access to sk->sk_stamp needs READ_ONCE().
BUG: KCSAN: data-race in packet_recvmsg / packet_recvmsg
write (marked) to 0xffff88803c81f258 of 8 bytes by task 19171 on cpu 0: sock_write_timestamp include/net/sock.h:2670 [inline] sock_recv_cmsgs include/net/sock.h:2722 [inline] packet_recvmsg+0xb97/0xd00 net/packet/af_packet.c:3489 sock_recvmsg_nosec net/socket.c:1019 [inline] sock_recvmsg+0x11a/0x130 net/socket.c:1040 sock_read_iter+0x176/0x220 net/socket.c:1118 call_read_iter include/linux/fs.h:1845 [inline] new_sync_read fs/read_write.c:389 [inline] vfs_read+0x5e0/0x630 fs/read_write.c:470 ksys_read+0x163/0x1a0 fs/read_write.c:613 __do_sys_read fs/read_write.c:623 [inline] __se_sys_read fs/read_write.c:621 [inline] __x64_sys_read+0x41/0x50 fs/read_write.c:621 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3b/0x90 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x72/0xdc
read to 0xffff88803c81f258 of 8 bytes by task 19183 on cpu 1: sock_recv_cmsgs include/net/sock.h:2721 [inline] packet_recvmsg+0xb64/0xd00 net/packet/af_packet.c:3489 sock_recvmsg_nosec net/socket.c:1019 [inline] sock_recvmsg+0x11a/0x130 net/socket.c:1040 sock_read_iter+0x176/0x220 net/socket.c:1118 call_read_iter include/linux/fs.h:1845 [inline] new_sync_read fs/read_write.c:389 [inline] vfs_read+0x5e0/0x630 fs/read_write.c:470 ksys_read+0x163/0x1a0 fs/read_write.c:613 __do_sys_read fs/read_write.c:623 [inline] __se_sys_read fs/read_write.c:621 [inline] __x64_sys_read+0x41/0x50 fs/read_write.c:621 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3b/0x90 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x72/0xdc
value changed: 0xffffffffc4653600 -> 0x0000000000000000
Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 19183 Comm: syz-executor.5 Not tainted 6.3.0-rc7-02330-gca6270c12e20 #2 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014
Exploitation
EPSS 0.22%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 14.0% of all scored CVEs. Scores of 1 Dec 2026.
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| Linux |
affected from 6c7c98bad4883a4a8710c96b2b44de482865eb6e, before fd28692fa182d25e8d26bc1db506648839fde245 affected from 6c7c98bad4883a4a8710c96b2b44de482865eb6e, before 564c3150ad357d571a0de7d8b644aa1f7e6e21b7 affected from 6c7c98bad4883a4a8710c96b2b44de482865eb6e, before d7343f8de019ebb55b2b6ef79b971f6ceb361a99 affected from 6c7c98bad4883a4a8710c96b2b44de482865eb6e, before d06f67b2b8dcd00d995c468428b6bccebc5762d8 affected from 6c7c98bad4883a4a8710c96b2b44de482865eb6e, before de260d1e02cde39d317066835ee6e5234fc9f5a8 affected from 6c7c98bad4883a4a8710c96b2b44de482865eb6e, before 7145f2309d649ad6273b9f66448321b9b4c523c8 affected from 6c7c98bad4883a4a8710c96b2b44de482865eb6e, before 8319220054e5ea5f506d8d4c4b5e234f668ffc3b affected from 6c7c98bad4883a4a8710c96b2b44de482865eb6e, before dfd9248c071a3710c24365897459538551cb7167
Other versions: unaffected
|
| Linux |
affected 4.12 unaffected before 4.12 unaffected from 4.14.316 up to and including 4.14.* unaffected from 4.19.284 up to and including 4.19.* unaffected from 5.4.244 up to and including 5.4.* unaffected from 5.10.181 up to and including 5.10.* unaffected from 5.15.113 up to and including 5.15.* unaffected from 6.1.30 up to and including 6.1.* unaffected from 6.3.4 up to and including 6.3.* unaffected 6.4 and later
Other versions: affected
|
Is my server affected?
This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:
uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2023-54218 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2023-54218
With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2023-54218
trivy image --scanners vuln IMAGE | grep CVE-2023-54218
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Other references
- https://git.kernel.org/stable/c/fd28692fa182d25e8d26bc1db506648839fde245 git.kernel.org
- https://git.kernel.org/stable/c/564c3150ad357d571a0de7d8b644aa1f7e6e21b7 git.kernel.org
- https://git.kernel.org/stable/c/d7343f8de019ebb55b2b6ef79b971f6ceb361a99 git.kernel.org
- https://git.kernel.org/stable/c/d06f67b2b8dcd00d995c468428b6bccebc5762d8 git.kernel.org
- https://git.kernel.org/stable/c/de260d1e02cde39d317066835ee6e5234fc9f5a8 git.kernel.org
- https://git.kernel.org/stable/c/7145f2309d649ad6273b9f66448321b9b4c523c8 git.kernel.org
- https://git.kernel.org/stable/c/8319220054e5ea5f506d8d4c4b5e234f668ffc3b git.kernel.org
- https://git.kernel.org/stable/c/dfd9248c071a3710c24365897459538551cb7167 git.kernel.org
Source: the record CVE-2023-54218 of the CVE List (CVE Program), CVE Terms of Use; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse