Vulnerability · Published Oct 21, 2024 · Assigned by Linux
CVE-2024-49888bpf: Fix a sdiv overflow issue
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.3% (higher than 21% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
In the Linux kernel, the following vulnerability has been resolved: bpf: Fix a sdiv overflow issue Zac Ecob reported a problem where a bpf program may cause kernel crash due to the following error: Oops: divide error: 0000 [#1] PREEMPT SMP KASAN PTI The failure is due to the below signed divide: LLONG_MIN/-1 where LLONG_MIN equals to -9,223,372,036,854,775,808. LLONG_MIN/-1 is supposed to give a positive number 9,223,372,036,854,775,808, but it is impossible since for 64-bit system, the maximum positive number is 9,223,372,036,854,775,807. On x86_64, LLONG_MIN/-1 will cause a kernel exception. On arm64, the result for LLONG_MIN/-1 is LLONG_MIN. Further investigation found all the following sdiv/smod cases may trigger an exception when bpf program is running on x86_64 platform: - LLONG_MIN/-1 for 64bit operation - INT_MIN/-1 for 32bit operation - LLONG_MIN%-1 for 64bit operation - INT_MIN%-1 for 32bit operation where -1 can be an immediate or in a register. On arm64, there are no exceptions: - LLONG_MIN/-1 = LLONG_MIN - INT_MIN/-1 = INT_MIN - LLONG_MIN%-1 = 0 - INT_MIN%-1 = 0 where -1 can be an immediate or in a register. Insn patching is needed to handle the above cases and the patched codes produced results aligned with above arm64 result. The below are pseudo codes to handle sdiv/smod exceptions including both divisor -1 and divisor 0 and the divisor is stored in a register. sdiv: tmp = rX tmp += 1 /* [-1, 0] -> [0, 1] if tmp >(unsigned) 1 goto L2 if tmp == 0 goto L1 rY = 0 L1: rY = -rY; goto L3 L2: rY /= rX L3: smod: tmp = rX tmp += 1 /* [-1, 0] -> [0, 1] if tmp >(unsigned) 1 goto L1 if tmp == 1 (is64 ? goto L2 : goto L3) rY = 0; goto L2 L1: rY %= rX L2: goto L4 // only when !is64 L3: wY = wY // only when !is64 L4: [1] https://lore.kernel.org/bpf/tPJLTEh7S_DxFEqAI2Ji5MBSoZVg7_G-Py2iaZpAaWtM961fFTWtsnlzwvTbzBzaUzwQAoNATXKUlt0LZOFgnDcIyKCswAnAGdUF3LBrhGQ=@protonmail.com/
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| AlmaLinux:9 | bpftool | 7.4.0-503.19.1.el9_5 | ALSA-2024:11486 |
| AlmaLinux:9 | kernel | 5.14.0-503.19.1.el9_5 | ALSA-2024:11486 |
| AlmaLinux:9 | kernel-64k | 5.14.0-503.19.1.el9_5 | ALSA-2024:11486 |
| AlmaLinux:9 | kernel-64k-core | 5.14.0-503.19.1.el9_5 | ALSA-2024:11486 |
| AlmaLinux:9 | kernel-64k-debug | 5.14.0-503.19.1.el9_5 | ALSA-2024:11486 |
| AlmaLinux:9 | kernel-64k-debug-core | 5.14.0-503.19.1.el9_5 | ALSA-2024:11486 |
| AlmaLinux:9 | kernel-64k-debug-devel | 5.14.0-503.19.1.el9_5 | ALSA-2024:11486 |
| AlmaLinux:9 | kernel-64k-debug-devel-matched | 5.14.0-503.19.1.el9_5 | ALSA-2024:11486 |
| AlmaLinux:9 | kernel-64k-debug-modules | 5.14.0-503.19.1.el9_5 | ALSA-2024:11486 |
| AlmaLinux:9 | kernel-64k-debug-modules-core | 5.14.0-503.19.1.el9_5 | ALSA-2024:11486 |
| AlmaLinux:9 | kernel-64k-debug-modules-extra | 5.14.0-503.19.1.el9_5 | ALSA-2024:11486 |
| AlmaLinux:9 | kernel-64k-devel | 5.14.0-503.19.1.el9_5 | ALSA-2024:11486 |
| AlmaLinux:9 | kernel-64k-devel-matched | 5.14.0-503.19.1.el9_5 | ALSA-2024:11486 |
| AlmaLinux:9 | kernel-64k-modules | 5.14.0-503.19.1.el9_5 | ALSA-2024:11486 |
| AlmaLinux:9 | kernel-64k-modules-core | 5.14.0-503.19.1.el9_5 | ALSA-2024:11486 |
| AlmaLinux:9 | kernel-64k-modules-extra | 5.14.0-503.19.1.el9_5 | ALSA-2024:11486 |
| AlmaLinux:9 | kernel-abi-stablelists | 5.14.0-503.19.1.el9_5 | ALSA-2024:11486 |
| AlmaLinux:9 | kernel-core | 5.14.0-503.19.1.el9_5 | ALSA-2024:11486 |
| AlmaLinux:9 | kernel-cross-headers | 5.14.0-503.19.1.el9_5 | ALSA-2024:11486 |
| AlmaLinux:9 | kernel-debug | 5.14.0-503.19.1.el9_5 | ALSA-2024:11486 |
| AlmaLinux:9 | kernel-debug-core | 5.14.0-503.19.1.el9_5 | ALSA-2024:11486 |
| AlmaLinux:9 | kernel-debug-devel | 5.14.0-503.19.1.el9_5 | ALSA-2024:11486 |
| AlmaLinux:9 | kernel-debug-devel-matched | 5.14.0-503.19.1.el9_5 | ALSA-2024:11486 |
| AlmaLinux:9 | kernel-debug-modules | 5.14.0-503.19.1.el9_5 | ALSA-2024:11486 |
| AlmaLinux:9 | kernel-debug-modules-core | 5.14.0-503.19.1.el9_5 | ALSA-2024:11486 |
| AlmaLinux:9 | kernel-debug-modules-extra | 5.14.0-503.19.1.el9_5 | ALSA-2024:11486 |
| AlmaLinux:9 | kernel-debug-uki-virt | 5.14.0-503.19.1.el9_5 | ALSA-2024:11486 |
| AlmaLinux:9 | kernel-devel | 5.14.0-503.19.1.el9_5 | ALSA-2024:11486 |
| AlmaLinux:9 | kernel-devel-matched | 5.14.0-503.19.1.el9_5 | ALSA-2024:11486 |
| AlmaLinux:9 | kernel-doc | 5.14.0-503.19.1.el9_5 | ALSA-2024:11486 |
| AlmaLinux:9 | kernel-headers | 5.14.0-503.19.1.el9_5 | ALSA-2024:11486 |
| AlmaLinux:9 | kernel-modules | 5.14.0-503.19.1.el9_5 | ALSA-2024:11486 |
| AlmaLinux:9 | kernel-modules-core | 5.14.0-503.19.1.el9_5 | ALSA-2024:11486 |
| AlmaLinux:9 | kernel-modules-extra | 5.14.0-503.19.1.el9_5 | ALSA-2024:11486 |
| AlmaLinux:9 | kernel-rt | 5.14.0-503.19.1.el9_5 | ALSA-2024:11486 |
| AlmaLinux:9 | kernel-rt-core | 5.14.0-503.19.1.el9_5 | ALSA-2024:11486 |
| AlmaLinux:9 | kernel-rt-debug | 5.14.0-503.19.1.el9_5 | ALSA-2024:11486 |
| AlmaLinux:9 | kernel-rt-debug-core | 5.14.0-503.19.1.el9_5 | ALSA-2024:11486 |
| AlmaLinux:9 | kernel-rt-debug-devel | 5.14.0-503.19.1.el9_5 | ALSA-2024:11486 |
| AlmaLinux:9 | kernel-rt-debug-modules | 5.14.0-503.19.1.el9_5 | ALSA-2024:11486 |
| AlmaLinux:9 | kernel-rt-debug-modules-core | 5.14.0-503.19.1.el9_5 | ALSA-2024:11486 |
| AlmaLinux:9 | kernel-rt-debug-modules-extra | 5.14.0-503.19.1.el9_5 | ALSA-2024:11486 |
| AlmaLinux:9 | kernel-rt-devel | 5.14.0-503.19.1.el9_5 | ALSA-2024:11486 |
| AlmaLinux:9 | kernel-rt-modules | 5.14.0-503.19.1.el9_5 | ALSA-2024:11486 |
| AlmaLinux:9 | kernel-rt-modules-core | 5.14.0-503.19.1.el9_5 | ALSA-2024:11486 |
| AlmaLinux:9 | kernel-rt-modules-extra | 5.14.0-503.19.1.el9_5 | ALSA-2024:11486 |
| AlmaLinux:9 | kernel-tools | 5.14.0-503.19.1.el9_5 | ALSA-2024:11486 |
| AlmaLinux:9 | kernel-tools-libs | 5.14.0-503.19.1.el9_5 | ALSA-2024:11486 |
| AlmaLinux:9 | kernel-tools-libs-devel | 5.14.0-503.19.1.el9_5 | ALSA-2024:11486 |
| AlmaLinux:9 | kernel-uki-virt | 5.14.0-503.19.1.el9_5 | ALSA-2024:11486 |
| AlmaLinux:9 | kernel-uki-virt-addons | 5.14.0-503.19.1.el9_5 | ALSA-2024:11486 |
| AlmaLinux:9 | kernel-zfcpdump | 5.14.0-503.19.1.el9_5 | ALSA-2024:11486 |
| AlmaLinux:9 | kernel-zfcpdump-core | 5.14.0-503.19.1.el9_5 | ALSA-2024:11486 |
| AlmaLinux:9 | kernel-zfcpdump-devel | 5.14.0-503.19.1.el9_5 | ALSA-2024:11486 |
| AlmaLinux:9 | kernel-zfcpdump-devel-matched | 5.14.0-503.19.1.el9_5 | ALSA-2024:11486 |
| AlmaLinux:9 | kernel-zfcpdump-modules | 5.14.0-503.19.1.el9_5 | ALSA-2024:11486 |
| AlmaLinux:9 | kernel-zfcpdump-modules-core | 5.14.0-503.19.1.el9_5 | ALSA-2024:11486 |
| AlmaLinux:9 | kernel-zfcpdump-modules-extra | 5.14.0-503.19.1.el9_5 | ALSA-2024:11486 |
| AlmaLinux:9 | libperf | 5.14.0-503.19.1.el9_5 | ALSA-2024:11486 |
| AlmaLinux:9 | perf | 5.14.0-503.19.1.el9_5 | ALSA-2024:11486 |
| AlmaLinux:9 | python3-perf | 5.14.0-503.19.1.el9_5 | ALSA-2024:11486 |
| AlmaLinux:9 | rtla | 5.14.0-503.19.1.el9_5 | ALSA-2024:11486 |
| AlmaLinux:9 | rv | 5.14.0-503.19.1.el9_5 | ALSA-2024:11486 |
| Debian:13 | linux | 6.11.4-1 | DEBIAN-CVE-2024-49888 |
| Debian:14 | linux | 6.11.4-1 | DEBIAN-CVE-2024-49888 |
| Ubuntu:24.04:LTS | linux | 6.8.0-54.56 | UBUNTU-CVE-2024-49888 |
| Ubuntu:22.04:LTS | linux-allwinner-5.19 | no fix listed | UBUNTU-CVE-2024-49888 |
| Ubuntu:24.04:LTS | linux-aws | 6.8.0-1023.25 | UBUNTU-CVE-2024-49888 |
| Ubuntu:22.04:LTS | linux-aws-5.19 | no fix listed | UBUNTU-CVE-2024-49888 |
| Ubuntu:22.04:LTS | linux-aws-6.2 | no fix listed | UBUNTU-CVE-2024-49888 |
| Ubuntu:22.04:LTS | linux-aws-6.5 | no fix listed | UBUNTU-CVE-2024-49888 |
| Ubuntu:22.04:LTS | linux-aws-6.8 | 6.8.0-1023.25~22.04.1 | UBUNTU-CVE-2024-49888 |
| Ubuntu:24.04:LTS | linux-azure | 6.8.0-1025.30 | UBUNTU-CVE-2024-49888 |
| Ubuntu:22.04:LTS | linux-azure-5.19 | no fix listed | UBUNTU-CVE-2024-49888 |
| Ubuntu:24.04:LTS | linux-azure-6.11 | 6.11.0-1012.12~24.04.1 | UBUNTU-CVE-2024-49888 |
| Ubuntu:22.04:LTS | linux-azure-6.2 | no fix listed | UBUNTU-CVE-2024-49888 |
| Ubuntu:22.04:LTS | linux-azure-6.5 | no fix listed | UBUNTU-CVE-2024-49888 |
| Ubuntu:22.04:LTS | linux-azure-6.8 | 6.8.0-1025.30~22.04.1 | UBUNTU-CVE-2024-49888 |
| Ubuntu:22.04:LTS | linux-azure-fde-5.19 | no fix listed | UBUNTU-CVE-2024-49888 |
| Ubuntu:22.04:LTS | linux-azure-fde-6.2 | no fix listed | UBUNTU-CVE-2024-49888 |
| Ubuntu:24.04:LTS | linux-azure-nvidia | 6.8.0-1014.15 | UBUNTU-CVE-2024-49888 |
| Ubuntu:24.04:LTS | linux-gcp | 6.8.0-1024.26 | UBUNTU-CVE-2024-49888 |
| Ubuntu:22.04:LTS | linux-gcp-5.19 | no fix listed | UBUNTU-CVE-2024-49888 |
| Ubuntu:24.04:LTS | linux-gcp-6.11 | 6.11.0-1011.11~24.04.1 | UBUNTU-CVE-2024-49888 |
| Ubuntu:22.04:LTS | linux-gcp-6.2 | no fix listed | UBUNTU-CVE-2024-49888 |
| Ubuntu:22.04:LTS | linux-gcp-6.5 | no fix listed | UBUNTU-CVE-2024-49888 |
| Ubuntu:22.04:LTS | linux-gcp-6.8 | 6.8.0-1024.26~22.04.1 | UBUNTU-CVE-2024-49888 |
| Ubuntu:24.04:LTS | linux-gke | 6.8.0-1019.23 | UBUNTU-CVE-2024-49888 |
| Ubuntu:24.04:LTS | linux-gkeop | 6.8.0-1006.8 | UBUNTU-CVE-2024-49888 |
| Ubuntu:22.04:LTS | linux-hwe-5.19 | no fix listed | UBUNTU-CVE-2024-49888 |
| Ubuntu:22.04:LTS | linux-hwe-6.2 | no fix listed | UBUNTU-CVE-2024-49888 |
| Ubuntu:22.04:LTS | linux-hwe-6.5 | no fix listed | UBUNTU-CVE-2024-49888 |
| Ubuntu:22.04:LTS | linux-hwe-6.8 | 6.8.0-57.59~22.04.1 | UBUNTU-CVE-2024-49888 |
| Ubuntu:24.04:LTS | linux-ibm | 6.8.0-1022.22 | UBUNTU-CVE-2024-49888 |
| Ubuntu:22.04:LTS | linux-ibm-6.8 | 6.8.0-1023.23~22.04.1 | UBUNTU-CVE-2024-49888 |
| Ubuntu:22.04:LTS | linux-intel-iot-realtime | no fix listed | UBUNTU-CVE-2024-49888 |
| Ubuntu:24.04:LTS | linux-lowlatency | 6.8.0-54.56.1 | UBUNTU-CVE-2024-49888 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-5.19 | no fix listed | UBUNTU-CVE-2024-49888 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.2 | no fix listed | UBUNTU-CVE-2024-49888 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.5 | no fix listed | UBUNTU-CVE-2024-49888 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.8 | 6.8.0-54.56.1~22.04.1 | UBUNTU-CVE-2024-49888 |
| Ubuntu:24.04:LTS | linux-nvidia | 6.8.0-1022.25 | UBUNTU-CVE-2024-49888 |
| Ubuntu:24.04:LTS | linux-nvidia-6.11 | 6.11.0-1007.7 | UBUNTU-CVE-2024-49888 |
| Ubuntu:22.04:LTS | linux-nvidia-6.2 | no fix listed | UBUNTU-CVE-2024-49888 |
| Ubuntu:22.04:LTS | linux-nvidia-6.5 | no fix listed | UBUNTU-CVE-2024-49888 |
| Ubuntu:22.04:LTS | linux-nvidia-6.8 | 6.8.0-1022.25~22.04.2 | UBUNTU-CVE-2024-49888 |
| Ubuntu:24.04:LTS | linux-nvidia-lowlatency | 6.8.0-1022.25.2 | UBUNTU-CVE-2024-49888 |
| Ubuntu:22.04:LTS | linux-oem-5.17 | no fix listed | UBUNTU-CVE-2024-49888 |
| Ubuntu:22.04:LTS | linux-oem-6.0 | no fix listed | UBUNTU-CVE-2024-49888 |
| Ubuntu:22.04:LTS | linux-oem-6.1 | no fix listed | UBUNTU-CVE-2024-49888 |
| Ubuntu:24.04:LTS | linux-oem-6.11 | 6.11.0-1015.15 | UBUNTU-CVE-2024-49888 |
| Ubuntu:22.04:LTS | linux-oem-6.5 | no fix listed | UBUNTU-CVE-2024-49888 |
| Ubuntu:24.04:LTS | linux-oem-6.8 | 6.8.0-1024.24 | UBUNTU-CVE-2024-49888 |
| Ubuntu:24.04:LTS | linux-oracle | 6.8.0-1020.21 | UBUNTU-CVE-2024-49888 |
| Ubuntu:22.04:LTS | linux-oracle-6.5 | no fix listed | UBUNTU-CVE-2024-49888 |
| Ubuntu:22.04:LTS | linux-oracle-6.8 | 6.8.0-1020.21~22.04.1 | UBUNTU-CVE-2024-49888 |
| Ubuntu:24.04:LTS | linux-raspi | 6.8.0-1019.23 | UBUNTU-CVE-2024-49888 |
| Ubuntu:22.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2024-49888 |
| Ubuntu:24.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2024-49888 |
| Ubuntu:22.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2024-49888 |
| Ubuntu:24.04:LTS | linux-riscv | 6.8.0-53.55.1 | UBUNTU-CVE-2024-49888 |
| Ubuntu:22.04:LTS | linux-riscv-5.19 | no fix listed | UBUNTU-CVE-2024-49888 |
| Ubuntu:22.04:LTS | linux-riscv-6.5 | no fix listed | UBUNTU-CVE-2024-49888 |
| Ubuntu:22.04:LTS | linux-riscv-6.8 | 6.8.0-53.55.1~22.04.1 | UBUNTU-CVE-2024-49888 |
| Ubuntu:22.04:LTS | linux-starfive-5.19 | no fix listed | UBUNTU-CVE-2024-49888 |
| Ubuntu:22.04:LTS | linux-starfive-6.2 | no fix listed | UBUNTU-CVE-2024-49888 |
| Ubuntu:22.04:LTS | linux-starfive-6.5 | no fix listed | UBUNTU-CVE-2024-49888 |
| Ubuntu:24.04:LTS | linux-xilinx | 6.8.0-1017.18 | UBUNTU-CVE-2024-49888 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | ec0e2da95f72d4a46050a4d994e4fe471474fd80 – before 45f2bbe7bc08d716a07a40025c672cad93180903ec0e2da95f72d4a46050a4d994e4fe471474fd80 – before 4902a6a0dc593c82055fc8c9ada371bafe26c9ccec0e2da95f72d4a46050a4d994e4fe471474fd80 – before d22e45a369afc7c28f11acfa5b5e8e478227ca5dec0e2da95f72d4a46050a4d994e4fe471474fd80 – before 7dd34d7b7dcf9309fc6224caf4dd5b35bedddcb7 |
| Linux | Linux | 6.6 |