CVE-2023-52843
llc: verify mac len before reading mac header
Check your servers for CVE-2023-52843
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-52843 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:
llc: verify mac len before reading mac header
LLC reads the mac header with eth_hdr without verifying that the skb has an Ethernet header.
Syzbot was able to enter llc_rcv on a tun device. Tun can insert packets without mac len and with user configurable skb->protocol (passing a tun_pi header when not configuring IFF_NO_PI).
BUG: KMSAN: uninit-value in llc_station_ac_send_test_r net/llc/llc_station.c:81 [inline] BUG: KMSAN: uninit-value in llc_station_rcv+0x6fb/0x1290 net/llc/llc_station.c:111 llc_station_ac_send_test_r net/llc/llc_station.c:81 [inline] llc_station_rcv+0x6fb/0x1290 net/llc/llc_station.c:111 llc_rcv+0xc5d/0x14a0 net/llc/llc_input.c:218 __netif_receive_skb_one_core net/core/dev.c:5523 [inline] __netif_receive_skb+0x1a6/0x5a0 net/core/dev.c:5637 netif_receive_skb_internal net/core/dev.c:5723 [inline] netif_receive_skb+0x58/0x660 net/core/dev.c:5782 tun_rx_batched+0x3ee/0x980 drivers/net/tun.c:1555 tun_get_user+0x54c5/0x69c0 drivers/net/tun.c:2002
Add a mac_len test before all three eth_hdr(skb) calls under net/llc.
There are further uses in include/net/llc_pdu.h. All these are protected by a test skb->protocol == ETH_P_802_2. Which does not protect against this tun scenario.
But the mac_len test added in this patch in llc_fixup_skb will indirectly protect those too. That is called from llc_rcv before any other LLC code.
It is tempting to just add a blanket mac_len check in llc_rcv, but not sure whether that could break valid LLC paths that do not assume an Ethernet header. 802.2 LLC may be used on top of non-802.3 protocols in principle. The below referenced commit shows that used to, on top of Token Ring.
At least one of the three eth_hdr uses goes back to before the start of git history. But the one that syzbot exercises is introduced in this commit. That commit is old enough (2008), that effectively all stable kernels should receive this.
Exploitation
EPSS 0.25%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 16.8% of all scored CVEs. Scores of 1 Dec 2026.
The assessment of CISA (SSVC, 17 Jun 2024):
- Exploitation
- none: CISA did not find evidence of exploitation or a public proof of concept
- Automatable
- no: each attack takes manual steps
- Technical impact
- partial: limited control or limited data
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| Linux |
affected from f83f1768f833cb45bc93429fdc552252a4f55ac3, before 900a4418e3f66a32db6baaf23f92b99c20ae6535 affected from f83f1768f833cb45bc93429fdc552252a4f55ac3, before 9a3f9054a5227d7567cba1fb821df48ccecad10c affected from f83f1768f833cb45bc93429fdc552252a4f55ac3, before cbdcdf42d15dac74c7287679fb2a9d955f8feb1f affected from f83f1768f833cb45bc93429fdc552252a4f55ac3, before 3a2653828ffc6101aef80bf58d5b77484239f779 affected from f83f1768f833cb45bc93429fdc552252a4f55ac3, before 352887b3edd007cf9b0abc30fe9d98622acd859b affected from f83f1768f833cb45bc93429fdc552252a4f55ac3, before f980e9a57dfb9530f1f4ee41a2420f2a256d7b29 affected from f83f1768f833cb45bc93429fdc552252a4f55ac3, before 0a720d0259ad3521ec6c9e4199f9f6fc75bac77a affected from f83f1768f833cb45bc93429fdc552252a4f55ac3, before ff5cb6a4f0c6d7fbdc84858323fb4b7af32cfd79 affected from f83f1768f833cb45bc93429fdc552252a4f55ac3, before 7b3ba18703a63f6fd487183b9262b08e5632da1b
Other versions: unaffected
|
| Linux |
affected 2.6.25 unaffected before 2.6.25 unaffected from 4.14.330 up to and including 4.14.* unaffected from 4.19.299 up to and including 4.19.* unaffected from 5.4.261 up to and including 5.4.* unaffected from 5.10.201 up to and including 5.10.* unaffected from 5.15.139 up to and including 5.15.* unaffected from 6.1.63 up to and including 6.1.* unaffected from 6.5.12 up to and including 6.5.* unaffected from 6.6.2 up to and including 6.6.* unaffected 6.7 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-52843 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2023-52843
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-52843
trivy image --scanners vuln IMAGE | grep CVE-2023-52843
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/900a4418e3f66a32db6baaf23f92b99c20ae6535 git.kernel.org
- https://git.kernel.org/stable/c/9a3f9054a5227d7567cba1fb821df48ccecad10c git.kernel.org
- https://git.kernel.org/stable/c/cbdcdf42d15dac74c7287679fb2a9d955f8feb1f git.kernel.org
- https://git.kernel.org/stable/c/3a2653828ffc6101aef80bf58d5b77484239f779 git.kernel.org
- https://git.kernel.org/stable/c/352887b3edd007cf9b0abc30fe9d98622acd859b git.kernel.org
- https://git.kernel.org/stable/c/f980e9a57dfb9530f1f4ee41a2420f2a256d7b29 git.kernel.org
- https://git.kernel.org/stable/c/0a720d0259ad3521ec6c9e4199f9f6fc75bac77a git.kernel.org
- https://git.kernel.org/stable/c/ff5cb6a4f0c6d7fbdc84858323fb4b7af32cfd79 git.kernel.org
- https://git.kernel.org/stable/c/7b3ba18703a63f6fd487183b9262b08e5632da1b git.kernel.org
Source: the record CVE-2023-52843 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse