Vulnerability · Published Oct 21, 2024 · Assigned by Linux
CVE-2024-47736erofs: handle overlapped pclusters out of crafted images properly
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 8% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
In the Linux kernel, the following vulnerability has been resolved: erofs: handle overlapped pclusters out of crafted images properly syzbot reported a task hang issue due to a deadlock case where it is waiting for the folio lock of a cached folio that will be used for cache I/Os. After looking into the crafted fuzzed image, I found it's formed with several overlapped big pclusters as below: Ext: logical offset | length : physical offset | length 0: 0.. 16384 | 16384 : 151552.. 167936 | 16384 1: 16384.. 32768 | 16384 : 155648.. 172032 | 16384 2: 32768.. 49152 | 16384 : 537223168.. 537239552 | 16384 ... Here, extent 0/1 are physically overlapped although it's entirely _impossible_ for normal filesystem images generated by mkfs. First, managed folios containing compressed data will be marked as up-to-date and then unlocked immediately (unlike in-place folios) when compressed I/Os are complete. If physical blocks are not submitted in the incremental order, there should be separate BIOs to avoid dependency issues. However, the current code mis-arranges z_erofs_fill_bio_vec() and BIO submission which causes unexpected BIO waits. Second, managed folios will be connected to their own pclusters for efficient inter-queries. However, this is somewhat hard to implement easily if overlapped big pclusters exist. Again, these only appear in fuzzed images so let's simply fall back to temporary short-lived pages for correctness. Additionally, it justifies that referenced managed folios cannot be truncated for now and reverts part of commit 2080ca1ed3e4 ("erofs: tidy up `struct z_erofs_bvec`") for simplicity although it shouldn't be any difference.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | linux | 6.1.170-1 | DEBIAN-CVE-2024-47736 |
| Debian:13 | linux | 6.11.2-1 | DEBIAN-CVE-2024-47736 |
| Debian:14 | linux | 6.11.2-1 | DEBIAN-CVE-2024-47736 |
| Ubuntu:22.04:LTS | linux | no fix listed | UBUNTU-CVE-2024-47736 |
| Ubuntu:24.04:LTS | linux | 6.8.0-60.63 | UBUNTU-CVE-2024-47736 |
| Ubuntu:24.04:LTS | linux | 6.8.0-60.63 | USN-7513-1 |
| Ubuntu:22.04:LTS | linux-allwinner-5.19 | no fix listed | UBUNTU-CVE-2024-47736 |
| Ubuntu:22.04:LTS | linux-aws | no fix listed | UBUNTU-CVE-2024-47736 |
| Ubuntu:24.04:LTS | linux-aws | 6.8.0-1029.31 | USN-7513-1 |
| Ubuntu:24.04:LTS | linux-aws | 6.8.0-1029.31 | UBUNTU-CVE-2024-47736 |
| Ubuntu:22.04:LTS | linux-aws-5.19 | no fix listed | UBUNTU-CVE-2024-47736 |
| Ubuntu:22.04:LTS | linux-aws-6.2 | no fix listed | UBUNTU-CVE-2024-47736 |
| Ubuntu:22.04:LTS | linux-aws-6.5 | no fix listed | UBUNTU-CVE-2024-47736 |
| Ubuntu:22.04:LTS | linux-aws-6.8 | 6.8.0-1029.31~22.04.1 | USN-7513-1 |
| Ubuntu:22.04:LTS | linux-aws-6.8 | 6.8.0-1029.31~22.04.1 | UBUNTU-CVE-2024-47736 |
| Ubuntu:22.04:LTS | linux-azure | no fix listed | UBUNTU-CVE-2024-47736 |
| Ubuntu:24.04:LTS | linux-azure | 6.8.0-1029.34 | UBUNTU-CVE-2024-47736 |
| Ubuntu:24.04:LTS | linux-azure | 6.8.0-1029.34 | USN-7513-3 |
| Ubuntu:22.04:LTS | linux-azure-5.19 | no fix listed | UBUNTU-CVE-2024-47736 |
| Ubuntu:24.04:LTS | linux-azure-6.11 | 6.11.0-1012.12~24.04.1 | UBUNTU-CVE-2024-47736 |
| Ubuntu:22.04:LTS | linux-azure-6.2 | no fix listed | UBUNTU-CVE-2024-47736 |
| Ubuntu:22.04:LTS | linux-azure-6.5 | no fix listed | UBUNTU-CVE-2024-47736 |
| Ubuntu:22.04:LTS | linux-azure-6.8 | 6.8.0-1029.34~22.04.1 | USN-7513-3 |
| Ubuntu:22.04:LTS | linux-azure-6.8 | 6.8.0-1029.34~22.04.1 | UBUNTU-CVE-2024-47736 |
| Ubuntu:22.04:LTS | linux-azure-fde | no fix listed | UBUNTU-CVE-2024-47736 |
| Ubuntu:22.04:LTS | linux-azure-fde-5.19 | no fix listed | UBUNTU-CVE-2024-47736 |
| Ubuntu:22.04:LTS | linux-azure-fde-6.2 | no fix listed | UBUNTU-CVE-2024-47736 |
| Ubuntu:24.04:LTS | linux-azure-nvidia | 6.8.0-1016.17 | UBUNTU-CVE-2024-47736 |
| Ubuntu:24.04:LTS | linux-azure-nvidia | 6.8.0-1016.17 | USN-7522-1 |
| Ubuntu:22.04:LTS | linux-gcp | no fix listed | UBUNTU-CVE-2024-47736 |
| Ubuntu:24.04:LTS | linux-gcp | 6.8.0-1030.32 | USN-7515-2 |
| Ubuntu:24.04:LTS | linux-gcp | 6.8.0-1030.32 | UBUNTU-CVE-2024-47736 |
| Ubuntu:22.04:LTS | linux-gcp-5.19 | no fix listed | UBUNTU-CVE-2024-47736 |
| Ubuntu:24.04:LTS | linux-gcp-6.11 | 6.11.0-1011.11~24.04.1 | UBUNTU-CVE-2024-47736 |
| Ubuntu:22.04:LTS | linux-gcp-6.2 | no fix listed | UBUNTU-CVE-2024-47736 |
| Ubuntu:22.04:LTS | linux-gcp-6.5 | no fix listed | UBUNTU-CVE-2024-47736 |
| Ubuntu:22.04:LTS | linux-gcp-6.8 | 6.8.0-1030.32~22.04.1 | USN-7515-2 |
| Ubuntu:22.04:LTS | linux-gcp-6.8 | 6.8.0-1030.32~22.04.1 | UBUNTU-CVE-2024-47736 |
| Ubuntu:22.04:LTS | linux-gke | no fix listed | UBUNTU-CVE-2024-47736 |
| Ubuntu:24.04:LTS | linux-gke | 6.8.0-1025.29 | USN-7515-1 |
| Ubuntu:24.04:LTS | linux-gke | 6.8.0-1025.29 | UBUNTU-CVE-2024-47736 |
| Ubuntu:22.04:LTS | linux-gkeop | no fix listed | UBUNTU-CVE-2024-47736 |
| Ubuntu:24.04:LTS | linux-gkeop | 6.8.0-1012.14 | USN-7515-2 |
| Ubuntu:24.04:LTS | linux-gkeop | 6.8.0-1012.14 | UBUNTU-CVE-2024-47736 |
| Ubuntu:22.04:LTS | linux-hwe-5.19 | no fix listed | UBUNTU-CVE-2024-47736 |
| Ubuntu:22.04:LTS | linux-hwe-6.2 | no fix listed | UBUNTU-CVE-2024-47736 |
| Ubuntu:22.04:LTS | linux-hwe-6.5 | no fix listed | UBUNTU-CVE-2024-47736 |
| Ubuntu:22.04:LTS | linux-hwe-6.8 | 6.8.0-60.63~22.04.1 | USN-7513-4 |
| Ubuntu:22.04:LTS | linux-hwe-6.8 | 6.8.0-60.63~22.04.1 | UBUNTU-CVE-2024-47736 |
| Ubuntu:22.04:LTS | linux-ibm | no fix listed | UBUNTU-CVE-2024-47736 |
| Ubuntu:24.04:LTS | linux-ibm | 6.8.0-1026.26 | UBUNTU-CVE-2024-47736 |
| Ubuntu:24.04:LTS | linux-ibm | 6.8.0-1026.26 | USN-7513-1 |
| Ubuntu:22.04:LTS | linux-ibm-6.8 | 6.8.0-1026.26~22.04.1 | UBUNTU-CVE-2024-47736 |
| Ubuntu:22.04:LTS | linux-intel-iot-realtime | no fix listed | UBUNTU-CVE-2024-47736 |
| Ubuntu:22.04:LTS | linux-intel-iotg | no fix listed | UBUNTU-CVE-2024-47736 |
| Ubuntu:22.04:LTS | linux-kvm | no fix listed | UBUNTU-CVE-2024-47736 |
| Ubuntu:22.04:LTS | linux-lowlatency | no fix listed | UBUNTU-CVE-2024-47736 |
| Ubuntu:24.04:LTS | linux-lowlatency | 6.8.0-60.63.1 | UBUNTU-CVE-2024-47736 |
| Ubuntu:24.04:LTS | linux-lowlatency | 6.8.0-60.63.1 | USN-7513-1 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-5.19 | no fix listed | UBUNTU-CVE-2024-47736 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.2 | no fix listed | UBUNTU-CVE-2024-47736 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.5 | no fix listed | UBUNTU-CVE-2024-47736 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.8 | 6.8.0-60.63.1~22.04.1 | USN-7513-1 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.8 | 6.8.0-60.63.1~22.04.1 | UBUNTU-CVE-2024-47736 |
| Ubuntu:22.04:LTS | linux-nvidia | no fix listed | UBUNTU-CVE-2024-47736 |
| Ubuntu:24.04:LTS | linux-nvidia | 6.8.0-1028.31 | UBUNTU-CVE-2024-47736 |
| Ubuntu:24.04:LTS | linux-nvidia | 6.8.0-1028.31 | USN-7514-1 |
| Ubuntu:24.04:LTS | linux-nvidia-6.11 | 6.11.0-1007.7 | UBUNTU-CVE-2024-47736 |
| Ubuntu:22.04:LTS | linux-nvidia-6.2 | no fix listed | UBUNTU-CVE-2024-47736 |
| Ubuntu:22.04:LTS | linux-nvidia-6.5 | no fix listed | UBUNTU-CVE-2024-47736 |
| Ubuntu:22.04:LTS | linux-nvidia-6.8 | 6.8.0-1028.31~22.04.1 | USN-7514-1 |
| Ubuntu:22.04:LTS | linux-nvidia-6.8 | 6.8.0-1028.31~22.04.1 | UBUNTU-CVE-2024-47736 |
| Ubuntu:24.04:LTS | linux-nvidia-lowlatency | 6.8.0-1028.31.1 | USN-7514-1 |
| Ubuntu:24.04:LTS | linux-nvidia-lowlatency | 6.8.0-1028.31.1 | UBUNTU-CVE-2024-47736 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra | no fix listed | UBUNTU-CVE-2024-47736 |
| Ubuntu:24.04:LTS | linux-nvidia-tegra | 6.8.0-1008.8 | UBUNTU-CVE-2024-47736 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra-igx | no fix listed | UBUNTU-CVE-2024-47736 |
| Ubuntu:22.04:LTS | linux-oem-5.17 | no fix listed | UBUNTU-CVE-2024-47736 |
| Ubuntu:22.04:LTS | linux-oem-6.0 | no fix listed | UBUNTU-CVE-2024-47736 |
| Ubuntu:22.04:LTS | linux-oem-6.1 | no fix listed | UBUNTU-CVE-2024-47736 |
| Ubuntu:24.04:LTS | linux-oem-6.11 | 6.11.0-1015.15 | UBUNTU-CVE-2024-47736 |
| Ubuntu:22.04:LTS | linux-oem-6.5 | no fix listed | UBUNTU-CVE-2024-47736 |
| Ubuntu:24.04:LTS | linux-oem-6.8 | 6.8.0-1028.28 | UBUNTU-CVE-2024-47736 |
| Ubuntu:24.04:LTS | linux-oem-6.8 | 6.8.0-1028.28 | USN-7513-3 |
| Ubuntu:22.04:LTS | linux-oracle | no fix listed | UBUNTU-CVE-2024-47736 |
| Ubuntu:24.04:LTS | linux-oracle | 6.8.0-1026.27 | USN-7513-1 |
| Ubuntu:24.04:LTS | linux-oracle | 6.8.0-1026.27 | UBUNTU-CVE-2024-47736 |
| Ubuntu:22.04:LTS | linux-oracle-6.5 | no fix listed | UBUNTU-CVE-2024-47736 |
| Ubuntu:22.04:LTS | linux-oracle-6.8 | 6.8.0-1026.27~22.04.1 | UBUNTU-CVE-2024-47736 |
| Ubuntu:22.04:LTS | linux-oracle-6.8 | 6.8.0-1026.27~22.04.1 | USN-7513-5 |
| Ubuntu:22.04:LTS | linux-raspi | no fix listed | UBUNTU-CVE-2024-47736 |
| Ubuntu:24.04:LTS | linux-raspi | 6.8.0-1028.32 | UBUNTU-CVE-2024-47736 |
| 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-47736 |
| Ubuntu:22.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2024-47736 |
| Ubuntu:24.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2024-47736 |
| Ubuntu:22.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2024-47736 |
| Ubuntu:24.04:LTS | linux-riscv | 6.8.0-60.63.1 | UBUNTU-CVE-2024-47736 |
| Ubuntu:22.04:LTS | linux-riscv-5.19 | no fix listed | UBUNTU-CVE-2024-47736 |
| Ubuntu:22.04:LTS | linux-riscv-6.5 | no fix listed | UBUNTU-CVE-2024-47736 |
| Ubuntu:22.04:LTS | linux-riscv-6.8 | 6.8.0-62.65~22.04.1 | UBUNTU-CVE-2024-47736 |
| Ubuntu:22.04:LTS | linux-starfive-5.19 | no fix listed | UBUNTU-CVE-2024-47736 |
| Ubuntu:22.04:LTS | linux-starfive-6.2 | no fix listed | UBUNTU-CVE-2024-47736 |
| Ubuntu:22.04:LTS | linux-starfive-6.5 | no fix listed | UBUNTU-CVE-2024-47736 |
| Ubuntu:24.04:LTS | linux-xilinx | 6.8.0-1017.18 | UBUNTU-CVE-2024-47736 |
| Ubuntu:22.04:LTS | linux-xilinx-zynqmp | no fix listed | UBUNTU-CVE-2024-47736 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | 8e6c8fa9f2e95c88a642521a5da19a8e31748846 – before c1172e65aad4b115392ea4c6e61e56e5b9b69df48e6c8fa9f2e95c88a642521a5da19a8e31748846 – before 1bf7e414cac303c9aec1be67872e19be8b64980c8e6c8fa9f2e95c88a642521a5da19a8e31748846 – before b9b30af0e86ffb485301ecd83b9129c9dfb7ebf88e6c8fa9f2e95c88a642521a5da19a8e31748846 – before 9cfa199bcbbbba31cbf97b2786f44f4464f3f29a8e6c8fa9f2e95c88a642521a5da19a8e31748846 – before 9e2f9d34dd12e6e5b244ec488bcebd0c2d566c50 |
| Linux | Linux | 5.13 |
References
- https://git.kernel.org/stable/c/c1172e65aad4b115392ea4c6e61e56e5b9b69df4
- https://git.kernel.org/stable/c/1bf7e414cac303c9aec1be67872e19be8b64980c
- https://git.kernel.org/stable/c/b9b30af0e86ffb485301ecd83b9129c9dfb7ebf8
- https://git.kernel.org/stable/c/9cfa199bcbbbba31cbf97b2786f44f4464f3f29a
- https://git.kernel.org/stable/c/9e2f9d34dd12e6e5b244ec488bcebd0c2d566c50
- https://cert-portal.siemens.com/productcert/html/ssa-082556.html
- https://cert-portal.siemens.com/productcert/html/ssa-019113.html
- https://cert-portal.siemens.com/productcert/html/ssa-457936.html