In the Linux kernel, the following vulnerability has been resolved:
btrfs: handle csum tree error with rescue=ibadroots correctly
[BUG] There is syzbot based reproducer that can crash the kernel, with the following call trace: (With some debug output added)
DEBUG: rescue=ibadroots parsed BTRFS: device fsid 14d642db-7b15-43e4-81e6-4b8fac6a25f8 devid 1 transid 8 /dev/loop0 (7:0) scanned by repro (1010) BTRFS info (device loop0): first mount of filesystem 14d642db-7b15-43e4-81e6-4b8fac6a25f8 BTRFS info (device loop0): using blake2b (blake2b-256-generic) checksum algorithm BTRFS info (device loop0): using free-space-tree BTRFS warning (device loop0): checksum verify failed on logical 5312512 mirror 1 wanted 0xb043382657aede36608fd3386d6b001692ff406164733d94e2d9a180412c6003 found 0x810ceb2bacb7f0f9eb2bf3b2b15c02af867cb35ad450898169f3b1f0bd818651 level 0 DEBUG: read tree root path failed for tree csum, ret=-5 BTRFS warning (device loop0): checksum verify failed on logical 5328896 mirror 1 wanted 0x51be4e8b303da58e6340226815b70e3a93592dac3f30dd510c7517454de8567a found 0x51be4e8b303da58e634022a315b70e3a93592dac3f30dd510c7517454de8567a level 0 BTRFS warning (device loop0): checksum verify failed on logical 5292032 mirror 1 wanted 0x1924ccd683be9efc2fa98582ef58760e3848e9043db8649ee382681e220cdee4 found 0x0cb6184f6e8799d9f8cb335dccd1d1832da1071d12290dab3b85b587ecacca6e level 0 process 'repro' launched './file2' with NULL argv: empty string added DEBUG: no csum root, idatacsums=0 ibadroots=134217728 Oops: general protection fault, probably for non-canonical address 0xdffffc0000000041: 0000 [#1] SMP KASAN NOPTI KASAN: null-ptr-deref in range [0x0000000000000208-0x000000000000020f] CPU: 5 UID: 0 PID: 1010 Comm: repro Tainted: G OE 6.15.0-custom+ #249 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS unknown 02/02/2022 RIP: 0010:btrfs_lookup_csum+0x93/0x3d0 [btrfs] Call Trace: <TASK> btrfs_lookup_bio_sums+0x47a/0xdf0 [btrfs] btrfs_submit_bbio+0x43e/0x1a80 [btrfs] submit_one_bio+0xde/0x160 [btrfs] btrfs_readahead+0x498/0x6a0 [btrfs] read_pages+0x1c3/0xb20 page_cache_ra_order+0x4b5/0xc20 filemap_get_pages+0x2d3/0x19e0 filemap_read+0x314/0xde0 __kernel_read+0x35b/0x900 bprm_execve+0x62e/0x1140 do_execveat_common.isra.0+0x3fc/0x520 __x64_sys_execveat+0xdc/0x130 do_syscall_64+0x54/0x1d0 entry_SYSCALL_64_after_hwframe+0x76/0x7e ---[ end trace 0000000000000000 ]---
[CAUSE] Firstly the fs has a corrupted csum tree root, thus to mount the fs we have to go "ro,rescue=ibadroots" mount option.
Normally with that mount option, a bad csum tree root should set BTRFS_FS_STATE_NO_DATA_CSUMS flag, so that any future data read will ignore csum search.
But in this particular case, we have the following call trace that caused NULL csum root, but not setting BTRFS_FS_STATE_NO_DATA_CSUMS:
load_global_roots_objectid():
ret = btrfs_search_slot(); /* Succeeded */ btrfs_item_key_to_cpu() found = true; /* We found the root item for csum tree. */ root = read_tree_root_path(); if (IS_ERR(root)) { if (!btrfs_test_opt(fs_info, IGNOREBADROOTS)) /* * Since we have rescue=ibadroots mount option, * @ret is still 0. */ break; if (!found || ret) { /* @found is true, @ret is 0, error handling for csum * tree is skipped. */ }
This means we completely skipped to set BTRFS_FS_STATE_NO_DATA_CSUMS if the csum tree is corrupted, which results unexpected later csum lookup.
[FIX] If read_tree_root_path() failed, always populate @ret to the error number.
As at the end of the function, we need @ret to determine if we need to do the extra error handling for csum tree.
| Product | Vendor Advisory | Solution File | Added | Published |
|---|---|---|---|---|
| Amazon_linux_2023 | — | Upgrade bpftoolUpgrade bpftool-debuginfoUpgrade bpftool6.12Upgrade bpftool6.12-debuginfoUpgrade kernelUpgrade kernel-debuginfoUpgrade kernel-debuginfo-common-aarch64Upgrade kernel-debuginfo-common-x86_64Upgrade kernel-develUpgrade kernel-headersUpgrade kernel-libbpfUpgrade kernel-libbpf-debuginfoUpgrade kernel-libbpf-develUpgrade kernel-libbpf-staticUpgrade kernel-livepatch-6.1.144-170.251Upgrade kernel-livepatch-6.12.37-61.105Upgrade kernel-modules-extraUpgrade kernel-modules-extra-commonUpgrade kernel-toolsUpgrade kernel-tools-debuginfoUpgrade kernel-tools-develUpgrade kernel6.12Upgrade kernel6.12-debuginfoUpgrade kernel6.12-debuginfo-common-aarch64Upgrade kernel6.12-debuginfo-common-x86_64Upgrade kernel6.12-develUpgrade kernel6.12-headersUpgrade kernel6.12-libbpfUpgrade kernel6.12-libbpf-debuginfoUpgrade kernel6.12-libbpf-develUpgrade kernel6.12-libbpf-staticUpgrade kernel6.12-modules-extraUpgrade kernel6.12-modules-extra-commonUpgrade kernel6.12-toolsUpgrade kernel6.12-tools-debuginfoUpgrade kernel6.12-tools-develUpgrade perfUpgrade perf-debuginfoUpgrade perf6.12Upgrade perf6.12-debuginfoUpgrade python3-perfUpgrade python3-perf-debuginfoUpgrade python3-perf6.12Upgrade python3-perf6.12-debuginfo | Sep 9, 2025 | Jul 9, 2025 |
| Debian | — | Upgrade linuxUpgrade linux-6.1 | Jul 10, 2025 | Jul 10, 2025 |
| Ubuntu | — | Upgrade linux-image-6.14.0-1007-azure-nvidiaUpgrade linux-image-6.14.0-1014-azureUpgrade linux-image-6.14.0-1014-oemUpgrade linux-image-6.14.0-1014-realtimeUpgrade linux-image-6.14.0-1015-awsUpgrade linux-image-6.14.0-1015-aws-64kUpgrade linux-image-6.14.0-1015-oracleUpgrade linux-image-6.14.0-1015-oracle-64kUpgrade linux-image-6.14.0-1016-raspiUpgrade linux-image-6.14.0-1018-gcpUpgrade linux-image-6.14.0-1018-gcp-64kUpgrade linux-image-6.14.0-34-genericUpgrade linux-image-6.14.0-34-generic-64kUpgrade linux-image-6.8.0-100-fipsUpgrade linux-image-6.8.0-100-genericUpgrade linux-image-6.8.0-100-generic-64kUpgrade linux-image-6.8.0-100-lowlatencyUpgrade linux-image-6.8.0-100-lowlatency-64kUpgrade linux-image-6.8.0-1023-xilinxUpgrade linux-image-6.8.0-1030-gkeopUpgrade linux-image-6.8.0-1043-gkeUpgrade linux-image-6.8.0-1043-gke-64kUpgrade linux-image-6.8.0-1043-oracleUpgrade linux-image-6.8.0-1043-oracle-64kUpgrade linux-image-6.8.0-1044-ibmUpgrade linux-image-6.8.0-1046-awsUpgrade linux-image-6.8.0-1046-aws-64kUpgrade linux-image-6.8.0-1046-aws-fipsUpgrade linux-image-6.8.0-1046-azureUpgrade linux-image-6.8.0-1046-azure-fipsUpgrade linux-image-6.8.0-1046-nvidiaUpgrade linux-image-6.8.0-1046-nvidia-64kUpgrade linux-image-6.8.0-1046-nvidia-lowlatencyUpgrade linux-image-6.8.0-1047-gcpUpgrade linux-image-6.8.0-1047-gcp-64kUpgrade linux-image-6.8.0-1047-gcp-fipsUpgrade linux-image-6.8.0-1047-raspiUpgrade linux-image-6.8.0-1051-azureUpgrade linux-image-6.8.0-2037-raspi-realtimeUpgrade linux-image-6.8.1-1041-realtimeUpgrade linux-image-awsUpgrade linux-image-aws-6.14Upgrade linux-image-aws-6.8Upgrade linux-image-aws-64kUpgrade linux-image-aws-64k-6.14Upgrade linux-image-aws-64k-6.8Upgrade linux-image-aws-64k-lts-24.04Upgrade linux-image-aws-fips-6.8Upgrade linux-image-azureUpgrade linux-image-azure-6.14Upgrade linux-image-azure-6.8Upgrade linux-image-azure-fipsUpgrade linux-image-azure-fips-6.8Upgrade linux-image-azure-lts-24.04Upgrade linux-image-azure-nvidiaUpgrade linux-image-azure-nvidia-6.14Upgrade linux-image-fipsUpgrade linux-image-fips-6.8Upgrade linux-image-gcpUpgrade linux-image-gcp-6.14Upgrade linux-image-gcp-6.8Upgrade linux-image-gcp-64kUpgrade linux-image-gcp-64k-6.14Upgrade linux-image-gcp-64k-6.8Upgrade linux-image-gcp-64k-lts-24.04Upgrade linux-image-gcp-fipsUpgrade linux-image-gcp-fips-6.8Upgrade linux-image-gcp-lts-24.04Upgrade linux-image-genericUpgrade linux-image-generic-6.14Upgrade linux-image-generic-6.8Upgrade linux-image-generic-64kUpgrade linux-image-generic-64k-6.14Upgrade linux-image-generic-64k-6.8Upgrade linux-image-generic-64k-hwe-22.04Upgrade linux-image-generic-64k-hwe-24.04Upgrade linux-image-generic-hwe-22.04Upgrade linux-image-generic-hwe-24.04Upgrade linux-image-generic-lpaeUpgrade linux-image-gkeUpgrade linux-image-gke-6.8Upgrade linux-image-gke-64kUpgrade linux-image-gke-64k-6.8Upgrade linux-image-gkeopUpgrade linux-image-gkeop-6.8Upgrade linux-image-ibm-6.8Upgrade linux-image-ibm-classicUpgrade linux-image-ibm-lts-24.04Upgrade linux-image-intel-iot-realtimeUpgrade linux-image-intel-iotgUpgrade linux-image-kvmUpgrade linux-image-lowlatency-6.8Upgrade linux-image-lowlatency-64kUpgrade linux-image-lowlatency-64k-6.8Upgrade linux-image-lowlatency-64k-hwe-22.04Upgrade linux-image-lowlatency-hwe-22.04Upgrade linux-image-nvidiaUpgrade linux-image-nvidia-6.8Upgrade linux-image-nvidia-64kUpgrade linux-image-nvidia-64k-6.8Upgrade linux-image-nvidia-64k-hwe-22.04Upgrade linux-image-nvidia-hwe-22.04Upgrade linux-image-nvidia-lowlatencyUpgrade linux-image-nvidia-lowlatency-64kUpgrade linux-image-nvidia-lowlatency-64k-6.8Upgrade linux-image-oem-22.04Upgrade linux-image-oem-22.04aUpgrade linux-image-oem-22.04bUpgrade linux-image-oem-22.04cUpgrade linux-image-oem-24.04Upgrade linux-image-oem-24.04aUpgrade linux-image-oem-24.04bUpgrade linux-image-oem-24.04cUpgrade linux-image-oem-6.14Upgrade linux-image-oracleUpgrade linux-image-oracle-6.14Upgrade linux-image-oracle-6.8Upgrade linux-image-oracle-64kUpgrade linux-image-oracle-64k-6.8Upgrade linux-image-oracle-64k-lts-24.04Upgrade linux-image-oracle-lts-24.04Upgrade linux-image-raspiUpgrade linux-image-raspi-6.14Upgrade linux-image-raspi-6.8Upgrade linux-image-raspi-realtimeUpgrade linux-image-raspi-realtime-6.8Upgrade linux-image-realtimeUpgrade linux-image-realtime-6.14Upgrade linux-image-realtime-6.8.1Upgrade linux-image-realtime-hwe-22.04Upgrade linux-image-realtime-hwe-24.04Upgrade linux-image-virtualUpgrade linux-image-virtual-6.14Upgrade linux-image-virtual-6.8Upgrade linux-image-virtual-hwe-24.04Upgrade linux-image-xilinxUpgrade linux-image-xilinx-6.8Upgrade linux-image-xilinx-zynqmp | Jul 14, 2025 | Jul 9, 2025 |
| Vmware Photon_os | — | Use 'tdnf update' to upgrade all packages to the latest version. | Jul 16, 2025 | Jul 9, 2025 |
With curated Threat Intelligence, you can see which vulnerabilities truly put you at risk, prioritize what matters most, and act before attackers do.
Explore Intelligence Hub