Vulnerability · Published May 21, 2024 · Assigned by Linux

CVE-2023-52843llc: verify mac len before reading mac header

Medium 5.5

In plain English

A medium-severity security flaw in Linux from Linux. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 16% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS NVD)5.5Medium
Exploit odds (30 days)0.2%top 84.2% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official 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.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:12linux6.1.64-1DEBIAN-CVE-2023-52843
Debian:13linux6.6.8-1DEBIAN-CVE-2023-52843
Debian:14linux6.6.8-1DEBIAN-CVE-2023-52843
Ubuntu:22.04:LTSlinux5.15.0-100.110UBUNTU-CVE-2023-52843
Ubuntu:22.04:LTSlinux-allwinner-5.19no fix listedUBUNTU-CVE-2023-52843
Ubuntu:22.04:LTSlinux-aws5.15.0-1056.61UBUNTU-CVE-2023-52843
Ubuntu:22.04:LTSlinux-aws-5.19no fix listedUBUNTU-CVE-2023-52843
Ubuntu:22.04:LTSlinux-aws-6.2no fix listedUBUNTU-CVE-2023-52843
Ubuntu:22.04:LTSlinux-aws-6.5no fix listedUBUNTU-CVE-2023-52843
Ubuntu:22.04:LTSlinux-azure5.15.0-1058.66UBUNTU-CVE-2023-52843
Ubuntu:22.04:LTSlinux-azure-5.19no fix listedUBUNTU-CVE-2023-52843
Ubuntu:22.04:LTSlinux-azure-6.2no fix listedUBUNTU-CVE-2023-52843
Ubuntu:22.04:LTSlinux-azure-6.5no fix listedUBUNTU-CVE-2023-52843
Ubuntu:22.04:LTSlinux-azure-fde5.15.0-1058.66.1UBUNTU-CVE-2023-52843
Ubuntu:22.04:LTSlinux-azure-fde-5.19no fix listedUBUNTU-CVE-2023-52843
Ubuntu:22.04:LTSlinux-azure-fde-6.2no fix listedUBUNTU-CVE-2023-52843
Ubuntu:22.04:LTSlinux-gcp5.15.0-1053.61UBUNTU-CVE-2023-52843
Ubuntu:22.04:LTSlinux-gcp-5.19no fix listedUBUNTU-CVE-2023-52843
Ubuntu:22.04:LTSlinux-gcp-6.2no fix listedUBUNTU-CVE-2023-52843
Ubuntu:22.04:LTSlinux-gcp-6.5no fix listedUBUNTU-CVE-2023-52843
Ubuntu:22.04:LTSlinux-gke5.15.0-1052.57UBUNTU-CVE-2023-52843
Ubuntu:22.04:LTSlinux-gkeop5.15.0-1038.44UBUNTU-CVE-2023-52843
Ubuntu:22.04:LTSlinux-hwe-5.19no fix listedUBUNTU-CVE-2023-52843
Ubuntu:22.04:LTSlinux-hwe-6.2no fix listedUBUNTU-CVE-2023-52843
Ubuntu:22.04:LTSlinux-hwe-6.5no fix listedUBUNTU-CVE-2023-52843
Ubuntu:22.04:LTSlinux-ibm5.15.0-1048.51UBUNTU-CVE-2023-52843
Ubuntu:22.04:LTSlinux-intel-iotg5.15.0-1050.56UBUNTU-CVE-2023-52843
Ubuntu:22.04:LTSlinux-kvm5.15.0-1052.57UBUNTU-CVE-2023-52843
Ubuntu:22.04:LTSlinux-lowlatency5.15.0-100.110UBUNTU-CVE-2023-52843
Ubuntu:22.04:LTSlinux-lowlatency-hwe-5.19no fix listedUBUNTU-CVE-2023-52843
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.2no fix listedUBUNTU-CVE-2023-52843
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.5no fix listedUBUNTU-CVE-2023-52843
Ubuntu:22.04:LTSlinux-nvidia5.15.0-1046.46UBUNTU-CVE-2023-52843
Ubuntu:22.04:LTSlinux-nvidia-6.2no fix listedUBUNTU-CVE-2023-52843
Ubuntu:22.04:LTSlinux-nvidia-6.56.5.0-1014.14UBUNTU-CVE-2023-52843
Ubuntu:22.04:LTSlinux-nvidia-tegra5.15.0-1025.25UBUNTU-CVE-2023-52843
Ubuntu:22.04:LTSlinux-nvidia-tegra-igx5.15.0-1012.12UBUNTU-CVE-2023-52843
Ubuntu:22.04:LTSlinux-oem-5.17no fix listedUBUNTU-CVE-2023-52843
Ubuntu:22.04:LTSlinux-oem-6.0no fix listedUBUNTU-CVE-2023-52843
Ubuntu:22.04:LTSlinux-oem-6.1no fix listedUBUNTU-CVE-2023-52843
Ubuntu:22.04:LTSlinux-oem-6.5no fix listedUBUNTU-CVE-2023-52843
Ubuntu:22.04:LTSlinux-oracle5.15.0-1053.59UBUNTU-CVE-2023-52843
Ubuntu:22.04:LTSlinux-oracle-6.5no fix listedUBUNTU-CVE-2023-52843
Ubuntu:22.04:LTSlinux-raspi5.15.0-1048.51UBUNTU-CVE-2023-52843
Ubuntu:24.04:LTSlinux-raspi-realtimeno fix listedUBUNTU-CVE-2023-52843
Ubuntu:22.04:LTSlinux-realtimeno fix listedUBUNTU-CVE-2023-52843
Ubuntu:22.04:LTSlinux-riscvno fix listedUBUNTU-CVE-2023-52843
Ubuntu:22.04:LTSlinux-riscv-5.19no fix listedUBUNTU-CVE-2023-52843
Ubuntu:22.04:LTSlinux-riscv-6.5no fix listedUBUNTU-CVE-2023-52843
Ubuntu:22.04:LTSlinux-starfive-5.19no fix listedUBUNTU-CVE-2023-52843
Ubuntu:22.04:LTSlinux-starfive-6.2no fix listedUBUNTU-CVE-2023-52843
Ubuntu:22.04:LTSlinux-starfive-6.5no fix listedUBUNTU-CVE-2023-52843
Ubuntu:22.04:LTSlinux-xilinx-zynqmp5.15.0-1030.34UBUNTU-CVE-2023-52843

Affected products (as reported)

VendorProductVersions
Linux Linux f83f1768f833cb45bc93429fdc552252a4f55ac3 – before 900a4418e3f66a32db6baaf23f92b99c20ae6535f83f1768f833cb45bc93429fdc552252a4f55ac3 – before 9a3f9054a5227d7567cba1fb821df48ccecad10cf83f1768f833cb45bc93429fdc552252a4f55ac3 – before cbdcdf42d15dac74c7287679fb2a9d955f8feb1ff83f1768f833cb45bc93429fdc552252a4f55ac3 – before 3a2653828ffc6101aef80bf58d5b77484239f779f83f1768f833cb45bc93429fdc552252a4f55ac3 – before 352887b3edd007cf9b0abc30fe9d98622acd859bf83f1768f833cb45bc93429fdc552252a4f55ac3 – before f980e9a57dfb9530f1f4ee41a2420f2a256d7b29f83f1768f833cb45bc93429fdc552252a4f55ac3 – before 0a720d0259ad3521ec6c9e4199f9f6fc75bac77af83f1768f833cb45bc93429fdc552252a4f55ac3 – before ff5cb6a4f0c6d7fbdc84858323fb4b7af32cfd79
Linux Linux 2.6.25

References