Vulnerability · Published Oct 21, 2024 · Assigned by Linux
CVE-2024-50022device-dax: correct pgoff align in dax_set_mapping()
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 19% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
In the Linux kernel, the following vulnerability has been resolved: device-dax: correct pgoff align in dax_set_mapping() pgoff should be aligned using ALIGN_DOWN() instead of ALIGN(). Otherwise, vmf->address not aligned to fault_size will be aligned to the next alignment, that can result in memory failure getting the wrong address. It's a subtle situation that only can be observed in page_mapped_in_vma() after the page is page fault handled by dev_dax_huge_fault. Generally, there is little chance to perform page_mapped_in_vma in dev-dax's page unless in specific error injection to the dax device to trigger an MCE - memory-failure. In that case, page_mapped_in_vma() will be triggered to determine which task is accessing the failure address and kill that task in the end. We used self-developed dax device (which is 2M aligned mapping) , to perform error injection to random address. It turned out that error injected to non-2M-aligned address was causing endless MCE until panic. Because page_mapped_in_vma() kept resulting wrong address and the task accessing the failure address was never killed properly: [ 3783.719419] Memory failure: 0x200c9742: recovery action for dax page: Recovered [ 3784.049006] mce: Uncorrected hardware memory error in user-access at 200c9742380 [ 3784.049190] Memory failure: 0x200c9742: recovery action for dax page: Recovered [ 3784.448042] mce: Uncorrected hardware memory error in user-access at 200c9742380 [ 3784.448186] Memory failure: 0x200c9742: recovery action for dax page: Recovered [ 3784.792026] mce: Uncorrected hardware memory error in user-access at 200c9742380 [ 3784.792179] Memory failure: 0x200c9742: recovery action for dax page: Recovered [ 3785.162502] mce: Uncorrected hardware memory error in user-access at 200c9742380 [ 3785.162633] Memory failure: 0x200c9742: recovery action for dax page: Recovered [ 3785.461116] mce: Uncorrected hardware memory error in user-access at 200c9742380 [ 3785.461247] Memory failure: 0x200c9742: recovery action for dax page: Recovered [ 3785.764730] mce: Uncorrected hardware memory error in user-access at 200c9742380 [ 3785.764859] Memory failure: 0x200c9742: recovery action for dax page: Recovered [ 3786.042128] mce: Uncorrected hardware memory error in user-access at 200c9742380 [ 3786.042259] Memory failure: 0x200c9742: recovery action for dax page: Recovered [ 3786.464293] mce: Uncorrected hardware memory error in user-access at 200c9742380 [ 3786.464423] Memory failure: 0x200c9742: recovery action for dax page: Recovered [ 3786.818090] mce: Uncorrected hardware memory error in user-access at 200c9742380 [ 3786.818217] Memory failure: 0x200c9742: recovery action for dax page: Recovered [ 3787.085297] mce: Uncorrected hardware memory error in user-access at 200c9742380 [ 3787.085424] Memory failure: 0x200c9742: recovery action for dax page: Recovered It took us several weeks to pinpoint this problem, but we eventually used bpftrace to trace the page fault and mce address and successfully identified the issue. Joao added: ; Likely we never reproduce in production because we always pin : device-dax regions in the region align they provide (Qemu does : similarly with prealloc in hugetlb/file backed memory). I think this : bug requires that we touch *unpinned* device-dax regions unaligned to : the device-dax selected alignment (page size i.e. 4K/2M/1G)
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | linux | 6.1.115-1 | DEBIAN-CVE-2024-50022 |
| Debian:13 | linux | 6.11.4-1 | DEBIAN-CVE-2024-50022 |
| Debian:14 | linux | 6.11.4-1 | DEBIAN-CVE-2024-50022 |
| Ubuntu:24.04:LTS | linux | 6.8.0-56.58 | USN-7383-1 |
| Ubuntu:24.04:LTS | linux | 6.8.0-56.58 | UBUNTU-CVE-2024-50022 |
| Ubuntu:22.04:LTS | linux-allwinner-5.19 | no fix listed | UBUNTU-CVE-2024-50022 |
| Ubuntu:24.04:LTS | linux-aws | 6.8.0-1025.27 | USN-7383-1 |
| Ubuntu:24.04:LTS | linux-aws | 6.8.0-1025.27 | UBUNTU-CVE-2024-50022 |
| Ubuntu:22.04:LTS | linux-aws-5.19 | no fix listed | UBUNTU-CVE-2024-50022 |
| Ubuntu:22.04:LTS | linux-aws-6.2 | no fix listed | UBUNTU-CVE-2024-50022 |
| Ubuntu:22.04:LTS | linux-aws-6.5 | no fix listed | UBUNTU-CVE-2024-50022 |
| Ubuntu:22.04:LTS | linux-aws-6.8 | 6.8.0-1027.29~22.04.1 | UBUNTU-CVE-2024-50022 |
| Ubuntu:22.04:LTS | linux-aws-6.8 | 6.8.0-1027.29~22.04.1 | USN-7451-1 |
| Ubuntu:24.04:LTS | linux-azure | 6.8.0-1025.30 | UBUNTU-CVE-2024-50022 |
| Ubuntu:22.04:LTS | linux-azure-5.19 | no fix listed | UBUNTU-CVE-2024-50022 |
| Ubuntu:24.04:LTS | linux-azure-6.11 | 6.11.0-1012.12~24.04.1 | UBUNTU-CVE-2024-50022 |
| Ubuntu:22.04:LTS | linux-azure-6.2 | no fix listed | UBUNTU-CVE-2024-50022 |
| Ubuntu:22.04:LTS | linux-azure-6.5 | no fix listed | UBUNTU-CVE-2024-50022 |
| Ubuntu:22.04:LTS | linux-azure-6.8 | 6.8.0-1025.30~22.04.1 | UBUNTU-CVE-2024-50022 |
| Ubuntu:22.04:LTS | linux-azure-fde-5.19 | no fix listed | UBUNTU-CVE-2024-50022 |
| Ubuntu:22.04:LTS | linux-azure-fde-6.2 | no fix listed | UBUNTU-CVE-2024-50022 |
| Ubuntu:24.04:LTS | linux-azure-nvidia | 6.8.0-1014.15 | UBUNTU-CVE-2024-50022 |
| Ubuntu:24.04:LTS | linux-gcp | 6.8.0-1026.28 | UBUNTU-CVE-2024-50022 |
| Ubuntu:24.04:LTS | linux-gcp | 6.8.0-1026.28 | USN-7383-1 |
| Ubuntu:22.04:LTS | linux-gcp-5.19 | no fix listed | UBUNTU-CVE-2024-50022 |
| Ubuntu:24.04:LTS | linux-gcp-6.11 | 6.11.0-1011.11~24.04.1 | UBUNTU-CVE-2024-50022 |
| Ubuntu:22.04:LTS | linux-gcp-6.2 | no fix listed | UBUNTU-CVE-2024-50022 |
| Ubuntu:22.04:LTS | linux-gcp-6.5 | no fix listed | UBUNTU-CVE-2024-50022 |
| Ubuntu:22.04:LTS | linux-gcp-6.8 | 6.8.0-1026.28~22.04.1 | UBUNTU-CVE-2024-50022 |
| Ubuntu:22.04:LTS | linux-gcp-6.8 | 6.8.0-1026.28~22.04.1 | USN-7383-1 |
| Ubuntu:24.04:LTS | linux-gke | 6.8.0-1021.25 | UBUNTU-CVE-2024-50022 |
| Ubuntu:24.04:LTS | linux-gke | 6.8.0-1021.25 | USN-7383-1 |
| Ubuntu:24.04:LTS | linux-gkeop | 6.8.0-1008.10 | USN-7383-1 |
| Ubuntu:24.04:LTS | linux-gkeop | 6.8.0-1008.10 | UBUNTU-CVE-2024-50022 |
| Ubuntu:22.04:LTS | linux-hwe-5.19 | no fix listed | UBUNTU-CVE-2024-50022 |
| Ubuntu:22.04:LTS | linux-hwe-6.2 | no fix listed | UBUNTU-CVE-2024-50022 |
| Ubuntu:22.04:LTS | linux-hwe-6.5 | no fix listed | UBUNTU-CVE-2024-50022 |
| Ubuntu:22.04:LTS | linux-hwe-6.8 | 6.8.0-57.59~22.04.1 | UBUNTU-CVE-2024-50022 |
| Ubuntu:24.04:LTS | linux-ibm | 6.8.0-1022.22 | UBUNTU-CVE-2024-50022 |
| Ubuntu:22.04:LTS | linux-ibm-6.8 | 6.8.0-1023.23~22.04.1 | UBUNTU-CVE-2024-50022 |
| Ubuntu:22.04:LTS | linux-intel-iot-realtime | no fix listed | UBUNTU-CVE-2024-50022 |
| Ubuntu:24.04:LTS | linux-lowlatency | 6.8.0-56.58.1 | UBUNTU-CVE-2024-50022 |
| Ubuntu:24.04:LTS | linux-lowlatency | 6.8.0-56.58.1 | USN-7383-1 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-5.19 | no fix listed | UBUNTU-CVE-2024-50022 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.2 | no fix listed | UBUNTU-CVE-2024-50022 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.5 | no fix listed | UBUNTU-CVE-2024-50022 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.8 | 6.8.0-56.58.1~22.04.1 | USN-7383-1 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.8 | 6.8.0-56.58.1~22.04.1 | UBUNTU-CVE-2024-50022 |
| Ubuntu:24.04:LTS | linux-nvidia | 6.8.0-1024.27 | UBUNTU-CVE-2024-50022 |
| Ubuntu:24.04:LTS | linux-nvidia | 6.8.0-1024.27 | USN-7383-1 |
| Ubuntu:24.04:LTS | linux-nvidia-6.11 | 6.11.0-1007.7 | UBUNTU-CVE-2024-50022 |
| Ubuntu:22.04:LTS | linux-nvidia-6.2 | no fix listed | UBUNTU-CVE-2024-50022 |
| Ubuntu:22.04:LTS | linux-nvidia-6.5 | no fix listed | UBUNTU-CVE-2024-50022 |
| Ubuntu:22.04:LTS | linux-nvidia-6.8 | 6.8.0-1024.27~22.04.1 | USN-7383-1 |
| Ubuntu:22.04:LTS | linux-nvidia-6.8 | 6.8.0-1024.27~22.04.1 | UBUNTU-CVE-2024-50022 |
| Ubuntu:24.04:LTS | linux-nvidia-lowlatency | 6.8.0-1024.27.1 | UBUNTU-CVE-2024-50022 |
| Ubuntu:24.04:LTS | linux-nvidia-lowlatency | 6.8.0-1024.27.1 | USN-7383-1 |
| Ubuntu:24.04:LTS | linux-nvidia-tegra | 6.8.0-1004.4 | UBUNTU-CVE-2024-50022 |
| Ubuntu:22.04:LTS | linux-oem-5.17 | no fix listed | UBUNTU-CVE-2024-50022 |
| Ubuntu:22.04:LTS | linux-oem-6.0 | no fix listed | UBUNTU-CVE-2024-50022 |
| Ubuntu:22.04:LTS | linux-oem-6.1 | no fix listed | UBUNTU-CVE-2024-50022 |
| Ubuntu:24.04:LTS | linux-oem-6.11 | 6.11.0-1015.15 | UBUNTU-CVE-2024-50022 |
| Ubuntu:22.04:LTS | linux-oem-6.5 | no fix listed | UBUNTU-CVE-2024-50022 |
| Ubuntu:24.04:LTS | linux-oem-6.8 | 6.8.0-1024.24 | UBUNTU-CVE-2024-50022 |
| Ubuntu:24.04:LTS | linux-oracle | 6.8.0-1022.23 | USN-7383-1 |
| Ubuntu:24.04:LTS | linux-oracle | 6.8.0-1022.23 | UBUNTU-CVE-2024-50022 |
| Ubuntu:22.04:LTS | linux-oracle-6.5 | no fix listed | UBUNTU-CVE-2024-50022 |
| Ubuntu:22.04:LTS | linux-oracle-6.8 | 6.8.0-1022.23~22.04.1 | USN-7383-1 |
| Ubuntu:22.04:LTS | linux-oracle-6.8 | 6.8.0-1022.23~22.04.1 | UBUNTU-CVE-2024-50022 |
| Ubuntu:24.04:LTS | linux-raspi | 6.8.0-1028.32 | UBUNTU-CVE-2024-50022 |
| Ubuntu:24.04:LTS | linux-raspi | 6.8.0-1028.32 | USN-7524-1 |
| Ubuntu:24.04:LTS | linux-raspi-realtime | no fix listed | UBUNTU-CVE-2024-50022 |
| Ubuntu:22.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2024-50022 |
| Ubuntu:24.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2024-50022 |
| Ubuntu:22.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2024-50022 |
| Ubuntu:24.04:LTS | linux-riscv | 6.8.0-56.58.1 | UBUNTU-CVE-2024-50022 |
| Ubuntu:22.04:LTS | linux-riscv-5.19 | no fix listed | UBUNTU-CVE-2024-50022 |
| Ubuntu:22.04:LTS | linux-riscv-6.5 | no fix listed | UBUNTU-CVE-2024-50022 |
| Ubuntu:22.04:LTS | linux-riscv-6.8 | 6.8.0-56.58.1~22.04.1 | UBUNTU-CVE-2024-50022 |
| Ubuntu:22.04:LTS | linux-starfive-5.19 | no fix listed | UBUNTU-CVE-2024-50022 |
| Ubuntu:22.04:LTS | linux-starfive-6.2 | no fix listed | UBUNTU-CVE-2024-50022 |
| Ubuntu:22.04:LTS | linux-starfive-6.5 | no fix listed | UBUNTU-CVE-2024-50022 |
| Ubuntu:24.04:LTS | linux-xilinx | 6.8.0-1017.18 | UBUNTU-CVE-2024-50022 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | b9b5777f09be84d0de472ded2253d2f5101427f2 – before 9c4198dfdca818c5ce19c764d90eabd156bbc6dab9b5777f09be84d0de472ded2253d2f5101427f2 – before b822007e8db341d6f175c645ed79866db501ad86b9b5777f09be84d0de472ded2253d2f5101427f2 – before e877427d218159ac29c9326100920d24330c9ee6b9b5777f09be84d0de472ded2253d2f5101427f2 – before 7fcbd9785d4c17ea533c42f20a9083a83f301fa6 |
| Linux | Linux | 5.17 |
References
- https://git.kernel.org/stable/c/9c4198dfdca818c5ce19c764d90eabd156bbc6da
- https://git.kernel.org/stable/c/b822007e8db341d6f175c645ed79866db501ad86
- https://git.kernel.org/stable/c/e877427d218159ac29c9326100920d24330c9ee6
- https://git.kernel.org/stable/c/7fcbd9785d4c17ea533c42f20a9083a83f301fa6
- https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html