Vulnerability · Published Mar 2, 2024 · Assigned by Linux
CVE-2023-52504x86/alternatives: Disable KASAN in apply_alternatives()
High 7.1
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 20% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
In the Linux kernel, the following vulnerability has been resolved: x86/alternatives: Disable KASAN in apply_alternatives() Fei has reported that KASAN triggers during apply_alternatives() on a 5-level paging machine: BUG: KASAN: out-of-bounds in rcu_is_watching() Read of size 4 at addr ff110003ee6419a0 by task swapper/0/0 ... __asan_load4() rcu_is_watching() trace_hardirqs_on() text_poke_early() apply_alternatives() ... On machines with 5-level paging, cpu_feature_enabled(X86_FEATURE_LA57) gets patched. It includes KASAN code, where KASAN_SHADOW_START depends on __VIRTUAL_MASK_SHIFT, which is defined with cpu_feature_enabled(). KASAN gets confused when apply_alternatives() patches the KASAN_SHADOW_START users. A test patch that makes KASAN_SHADOW_START static, by replacing __VIRTUAL_MASK_SHIFT with 56, works around the issue. Fix it for real by disabling KASAN while the kernel is patching alternatives. [ mingo: updated the changelog ]
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | linux | 6.1.64-1 | DEBIAN-CVE-2023-52504 |
| Debian:13 | linux | 6.5.8-1 | DEBIAN-CVE-2023-52504 |
| Debian:14 | linux | 6.5.8-1 | DEBIAN-CVE-2023-52504 |
| Ubuntu:22.04:LTS | linux | 5.15.0-94.104 | UBUNTU-CVE-2023-52504 |
| Ubuntu:22.04:LTS | linux-allwinner-5.19 | no fix listed | UBUNTU-CVE-2023-52504 |
| Ubuntu:22.04:LTS | linux-aws | 5.15.0-1053.58 | UBUNTU-CVE-2023-52504 |
| Ubuntu:22.04:LTS | linux-aws-5.19 | no fix listed | UBUNTU-CVE-2023-52504 |
| Ubuntu:22.04:LTS | linux-aws-6.2 | no fix listed | UBUNTU-CVE-2023-52504 |
| Ubuntu:22.04:LTS | linux-aws-6.5 | no fix listed | UBUNTU-CVE-2023-52504 |
| Ubuntu:22.04:LTS | linux-azure | 5.15.0-1056.64 | UBUNTU-CVE-2023-52504 |
| Ubuntu:22.04:LTS | linux-azure-5.19 | no fix listed | UBUNTU-CVE-2023-52504 |
| Ubuntu:22.04:LTS | linux-azure-6.2 | no fix listed | UBUNTU-CVE-2023-52504 |
| Ubuntu:22.04:LTS | linux-azure-6.5 | no fix listed | UBUNTU-CVE-2023-52504 |
| Ubuntu:22.04:LTS | linux-azure-fde | 5.15.0-1056.64.1 | UBUNTU-CVE-2023-52504 |
| Ubuntu:22.04:LTS | linux-azure-fde-5.19 | no fix listed | UBUNTU-CVE-2023-52504 |
| Ubuntu:22.04:LTS | linux-azure-fde-6.2 | no fix listed | UBUNTU-CVE-2023-52504 |
| Ubuntu:22.04:LTS | linux-gcp | 5.15.0-1051.59 | UBUNTU-CVE-2023-52504 |
| Ubuntu:22.04:LTS | linux-gcp-5.19 | no fix listed | UBUNTU-CVE-2023-52504 |
| Ubuntu:22.04:LTS | linux-gcp-6.2 | no fix listed | UBUNTU-CVE-2023-52504 |
| Ubuntu:22.04:LTS | linux-gcp-6.5 | no fix listed | UBUNTU-CVE-2023-52504 |
| Ubuntu:22.04:LTS | linux-gke | 5.15.0-1050.55 | UBUNTU-CVE-2023-52504 |
| Ubuntu:22.04:LTS | linux-gkeop | 5.15.0-1036.42 | UBUNTU-CVE-2023-52504 |
| Ubuntu:22.04:LTS | linux-hwe-5.19 | no fix listed | UBUNTU-CVE-2023-52504 |
| Ubuntu:22.04:LTS | linux-hwe-6.2 | no fix listed | UBUNTU-CVE-2023-52504 |
| Ubuntu:22.04:LTS | linux-hwe-6.5 | no fix listed | UBUNTU-CVE-2023-52504 |
| Ubuntu:22.04:LTS | linux-ibm | 5.15.0-1046.49 | UBUNTU-CVE-2023-52504 |
| Ubuntu:22.04:LTS | linux-intel-iotg | 5.15.0-1047.53 | UBUNTU-CVE-2023-52504 |
| Ubuntu:22.04:LTS | linux-kvm | 5.15.0-1050.55 | UBUNTU-CVE-2023-52504 |
| Ubuntu:22.04:LTS | linux-lowlatency | 5.15.0-94.104 | UBUNTU-CVE-2023-52504 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-5.19 | no fix listed | UBUNTU-CVE-2023-52504 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.2 | no fix listed | UBUNTU-CVE-2023-52504 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.5 | no fix listed | UBUNTU-CVE-2023-52504 |
| Ubuntu:22.04:LTS | linux-nvidia | 5.15.0-1044.44 | UBUNTU-CVE-2023-52504 |
| Ubuntu:22.04:LTS | linux-nvidia-6.2 | no fix listed | UBUNTU-CVE-2023-52504 |
| Ubuntu:22.04:LTS | linux-nvidia-6.5 | 6.5.0-1014.14 | UBUNTU-CVE-2023-52504 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra | 5.15.0-1022.22 | UBUNTU-CVE-2023-52504 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra-igx | 5.15.0-1009.9 | UBUNTU-CVE-2023-52504 |
| Ubuntu:22.04:LTS | linux-oem-5.17 | no fix listed | UBUNTU-CVE-2023-52504 |
| Ubuntu:22.04:LTS | linux-oem-6.0 | no fix listed | UBUNTU-CVE-2023-52504 |
| Ubuntu:22.04:LTS | linux-oem-6.1 | no fix listed | UBUNTU-CVE-2023-52504 |
| Ubuntu:22.04:LTS | linux-oem-6.5 | no fix listed | UBUNTU-CVE-2023-52504 |
| Ubuntu:22.04:LTS | linux-oracle | 5.15.0-1051.57 | UBUNTU-CVE-2023-52504 |
| Ubuntu:22.04:LTS | linux-oracle-6.5 | no fix listed | UBUNTU-CVE-2023-52504 |
| Ubuntu:22.04:LTS | linux-raspi | 5.15.0-1046.49 | UBUNTU-CVE-2023-52504 |
| Ubuntu:24.04:LTS | linux-raspi-realtime | no fix listed | UBUNTU-CVE-2023-52504 |
| Ubuntu:22.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2023-52504 |
| Ubuntu:22.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2023-52504 |
| Ubuntu:22.04:LTS | linux-riscv-5.19 | no fix listed | UBUNTU-CVE-2023-52504 |
| Ubuntu:22.04:LTS | linux-starfive-5.19 | no fix listed | UBUNTU-CVE-2023-52504 |
| Ubuntu:22.04:LTS | linux-starfive-6.2 | no fix listed | UBUNTU-CVE-2023-52504 |
| Ubuntu:22.04:LTS | linux-xilinx-zynqmp | 5.15.0-1027.31 | UBUNTU-CVE-2023-52504 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | 6657fca06e3ffab8d0b3f9d8b397f5ee498952d7 – before 3719d3c36aa853d5a2401af9f8d6b116c91ad5ae6657fca06e3ffab8d0b3f9d8b397f5ee498952d7 – before 3770c38cd6a60494da29ac2da73ff8156440a2d16657fca06e3ffab8d0b3f9d8b397f5ee498952d7 – before 6788b10620ca6e98575d1e06e72a8974aad7657e6657fca06e3ffab8d0b3f9d8b397f5ee498952d7 – before ecba5afe86f30605eb9dfb7f265a8de0218d4cfc6657fca06e3ffab8d0b3f9d8b397f5ee498952d7 – before 5b784489c8158518bf7a466bb3cc045b0fb66b4b6657fca06e3ffab8d0b3f9d8b397f5ee498952d7 – before cd287cc208dfe6bd6da98e7f88e723209242c9b46657fca06e3ffab8d0b3f9d8b397f5ee498952d7 – before d35652a5fc9944784f6f50a5c979518ff8dacf61 |
| Linux | Linux | 4.17 |
References
- https://git.kernel.org/stable/c/3719d3c36aa853d5a2401af9f8d6b116c91ad5ae
- https://git.kernel.org/stable/c/3770c38cd6a60494da29ac2da73ff8156440a2d1
- https://git.kernel.org/stable/c/6788b10620ca6e98575d1e06e72a8974aad7657e
- https://git.kernel.org/stable/c/ecba5afe86f30605eb9dfb7f265a8de0218d4cfc
- https://git.kernel.org/stable/c/5b784489c8158518bf7a466bb3cc045b0fb66b4b
- https://git.kernel.org/stable/c/cd287cc208dfe6bd6da98e7f88e723209242c9b4
- https://git.kernel.org/stable/c/d35652a5fc9944784f6f50a5c979518ff8dacf61