Vulnerability · Published Nov 5, 2024 · Assigned by Linux

CVE-2023-52920bpf: support non-r10 register spill/fill to/from stack in precision tracking

High 7.8

In plain English

A high-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.3% (higher than 17% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)7.8High
Exploit odds (30 days)0.3%top 83.0% 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: bpf: support non-r10 register spill/fill to/from stack in precision tracking Use instruction (jump) history to record instructions that performed register spill/fill to/from stack, regardless if this was done through read-only r10 register, or any other register after copying r10 into it *and* potentially adjusting offset. To make this work reliably, we push extra per-instruction flags into instruction history, encoding stack slot index (spi) and stack frame number in extra 10 bit flags we take away from prev_idx in instruction history. We don't touch idx field for maximum performance, as it's checked most frequently during backtracking. This change removes basically the last remaining practical limitation of precision backtracking logic in BPF verifier. It fixes known deficiencies, but also opens up new opportunities to reduce number of verified states, explored in the subsequent patches. There are only three differences in selftests' BPF object files according to veristat, all in the positive direction (less states). File Program Insns (A) Insns (B) Insns (DIFF) States (A) States (B) States (DIFF) -------------------------------------- ------------- --------- --------- ------------- ---------- ---------- ------------- test_cls_redirect_dynptr.bpf.linked3.o cls_redirect 2987 2864 -123 (-4.12%) 240 231 -9 (-3.75%) xdp_synproxy_kern.bpf.linked3.o syncookie_tc 82848 82661 -187 (-0.23%) 5107 5073 -34 (-0.67%) xdp_synproxy_kern.bpf.linked3.o syncookie_xdp 85116 84964 -152 (-0.18%) 5162 5130 -32 (-0.62%) Note, I avoided renaming jmp_history to more generic insn_hist to minimize number of lines changed and potential merge conflicts between bpf and bpf-next trees. Notice also cur_hist_entry pointer reset to NULL at the beginning of instruction verification loop. This pointer avoids the problem of relying on last jump history entry's insn_idx to determine whether we already have entry for current instruction or not. It can happen that we added jump history entry because current instruction is_jmp_point(), but also we need to add instruction flags for stack access. In this case, we don't want to entries, so we need to reuse last added entry, if it is present. Relying on insn_idx comparison has the same ambiguity problem as the one that was fixed recently in [0], so we avoid that. [0] https://patchwork.kernel.org/project/netdevbpf/patch/20231110002638.4168352-3-andrii@kernel.org/

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:12linuxno fix listedDEBIAN-CVE-2023-52920
Debian:13linux6.8.9-1DEBIAN-CVE-2023-52920
Debian:14linux6.8.9-1DEBIAN-CVE-2023-52920
Ubuntu:22.04:LTSlinuxno fix listedUBUNTU-CVE-2023-52920
Ubuntu:22.04:LTSlinux-allwinner-5.19no fix listedUBUNTU-CVE-2023-52920
Ubuntu:22.04:LTSlinux-awsno fix listedUBUNTU-CVE-2023-52920
Ubuntu:22.04:LTSlinux-aws-5.19no fix listedUBUNTU-CVE-2023-52920
Ubuntu:22.04:LTSlinux-aws-6.2no fix listedUBUNTU-CVE-2023-52920
Ubuntu:22.04:LTSlinux-aws-6.5no fix listedUBUNTU-CVE-2023-52920
Ubuntu:22.04:LTSlinux-azureno fix listedUBUNTU-CVE-2023-52920
Ubuntu:22.04:LTSlinux-azure-5.19no fix listedUBUNTU-CVE-2023-52920
Ubuntu:22.04:LTSlinux-azure-6.2no fix listedUBUNTU-CVE-2023-52920
Ubuntu:22.04:LTSlinux-azure-6.5no fix listedUBUNTU-CVE-2023-52920
Ubuntu:22.04:LTSlinux-azure-fdeno fix listedUBUNTU-CVE-2023-52920
Ubuntu:22.04:LTSlinux-azure-fde-5.19no fix listedUBUNTU-CVE-2023-52920
Ubuntu:22.04:LTSlinux-azure-fde-6.2no fix listedUBUNTU-CVE-2023-52920
Ubuntu:22.04:LTSlinux-gcpno fix listedUBUNTU-CVE-2023-52920
Ubuntu:22.04:LTSlinux-gcp-5.19no fix listedUBUNTU-CVE-2023-52920
Ubuntu:22.04:LTSlinux-gcp-6.2no fix listedUBUNTU-CVE-2023-52920
Ubuntu:22.04:LTSlinux-gcp-6.5no fix listedUBUNTU-CVE-2023-52920
Ubuntu:22.04:LTSlinux-gkeno fix listedUBUNTU-CVE-2023-52920
Ubuntu:22.04:LTSlinux-gkeopno fix listedUBUNTU-CVE-2023-52920
Ubuntu:22.04:LTSlinux-hwe-5.19no fix listedUBUNTU-CVE-2023-52920
Ubuntu:22.04:LTSlinux-hwe-6.2no fix listedUBUNTU-CVE-2023-52920
Ubuntu:22.04:LTSlinux-hwe-6.5no fix listedUBUNTU-CVE-2023-52920
Ubuntu:22.04:LTSlinux-ibmno fix listedUBUNTU-CVE-2023-52920
Ubuntu:22.04:LTSlinux-intel-iot-realtimeno fix listedUBUNTU-CVE-2023-52920
Ubuntu:22.04:LTSlinux-intel-iotgno fix listedUBUNTU-CVE-2023-52920
Ubuntu:22.04:LTSlinux-kvmno fix listedUBUNTU-CVE-2023-52920
Ubuntu:22.04:LTSlinux-lowlatencyno fix listedUBUNTU-CVE-2023-52920
Ubuntu:22.04:LTSlinux-lowlatency-hwe-5.19no fix listedUBUNTU-CVE-2023-52920
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.2no fix listedUBUNTU-CVE-2023-52920
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.5no fix listedUBUNTU-CVE-2023-52920
Ubuntu:22.04:LTSlinux-nvidiano fix listedUBUNTU-CVE-2023-52920
Ubuntu:22.04:LTSlinux-nvidia-6.2no fix listedUBUNTU-CVE-2023-52920
Ubuntu:22.04:LTSlinux-nvidia-6.5no fix listedUBUNTU-CVE-2023-52920
Ubuntu:22.04:LTSlinux-nvidia-tegrano fix listedUBUNTU-CVE-2023-52920
Ubuntu:22.04:LTSlinux-nvidia-tegra-igxno fix listedUBUNTU-CVE-2023-52920
Ubuntu:22.04:LTSlinux-oem-5.17no fix listedUBUNTU-CVE-2023-52920
Ubuntu:22.04:LTSlinux-oem-6.0no fix listedUBUNTU-CVE-2023-52920
Ubuntu:22.04:LTSlinux-oem-6.1no fix listedUBUNTU-CVE-2023-52920
Ubuntu:22.04:LTSlinux-oem-6.5no fix listedUBUNTU-CVE-2023-52920
Ubuntu:22.04:LTSlinux-oracleno fix listedUBUNTU-CVE-2023-52920
Ubuntu:22.04:LTSlinux-oracle-6.5no fix listedUBUNTU-CVE-2023-52920
Ubuntu:22.04:LTSlinux-raspino fix listedUBUNTU-CVE-2023-52920
Ubuntu:22.04:LTSlinux-realtimeno fix listedUBUNTU-CVE-2023-52920
Ubuntu:22.04:LTSlinux-riscvno fix listedUBUNTU-CVE-2023-52920
Ubuntu:22.04:LTSlinux-riscv-5.19no fix listedUBUNTU-CVE-2023-52920
Ubuntu:22.04:LTSlinux-riscv-6.5no fix listedUBUNTU-CVE-2023-52920
Ubuntu:22.04:LTSlinux-starfive-5.19no fix listedUBUNTU-CVE-2023-52920
Ubuntu:22.04:LTSlinux-starfive-6.2no fix listedUBUNTU-CVE-2023-52920
Ubuntu:22.04:LTSlinux-starfive-6.5no fix listedUBUNTU-CVE-2023-52920
Ubuntu:22.04:LTSlinux-xilinx-zynqmpno fix listedUBUNTU-CVE-2023-52920

Affected products (as reported)

VendorProductVersions
Linux Linux b5dc0163d8fd78e64a7e21f309cf932fda34353e – before ecc2aeeaa08a355d84d3ca9c3d2512399a194f29b5dc0163d8fd78e64a7e21f309cf932fda34353e – before 199f0452873741fa4b8d4d88958e929030b2f92bb5dc0163d8fd78e64a7e21f309cf932fda34353e – before e4da60feca4d35e1a9b03dc0affa3354f9ff45e4b5dc0163d8fd78e64a7e21f309cf932fda34353e – before 41f6f64e6999a837048b1bd13a2f8742964eca6b
Linux Linux 5.3

References