In the Linux kernel, the following vulnerability has been resolved:
btrfs: scrub: handle RST lookup error correctly
[BUG] When running btrfs/060 with forced RST feature, it would crash the following ASSERT() inside scrub_read_endio():
ASSERT(sector_nr < stripe->nr_sectors);
Before that, we would have tree dump from btrfs_get_raid_extent_offset(), as we failed to find the RST entry for the range.
[CAUSE] Inside scrub_submit_extent_sector_read() every time we allocated a new bbio we immediately called btrfs_map_block() to make sure there was some RST range covering the scrub target.
But if btrfs_map_block() fails, we immediately call endio for the bbio, while the bbio is newly allocated, it's completely empty.
Then inside scrub_read_endio(), we go through the bvecs to find the sector number (as bi_sector is no longer reliable if the bio is submitted to lower layers).
And since the bio is empty, such bvecs iteration would not find any sector matching the sector, and return sector_nr == stripe->nr_sectors, triggering the ASSERT().
[FIX] Instead of calling btrfs_map_block() after allocating a new bbio, call btrfs_map_block() first.
Since our only objective of calling btrfs_map_block() is only to update stripe_len, there is really no need to do that after btrfs_alloc_bio().
This new timing would avoid the problem of handling empty bbio completely, and in fact fixes a possible race window for the old code, where if the submission thread is the only owner of the pending_io, the scrub would never finish (since we didn't decrease the pending_io counter).
Although the root cause of RST lookup failure still needs to be addressed.
| Product | Vendor Advisory | Solution File | Added | Published |
|---|---|---|---|---|
| Debian | — | Upgrade linux | May 15, 2025 | Jul 29, 2024 |
| Redhat_linux | — | No solution exists | Jul 9, 2025 | Jul 29, 2024 |
| Ubuntu | — | Upgrade linux-image-6.8.0-1002-gkeopUpgrade linux-image-6.8.0-1016-gcpUpgrade linux-image-gkeopUpgrade linux-image-lowlatency-hwe-22.04Upgrade linux-image-ibm-classicUpgrade linux-image-6.8.0-1015-oracleUpgrade linux-image-gkeop-6.8Upgrade linux-image-6.8.0-1013-gkeUpgrade linux-image-virtual-hwe-24.04Upgrade linux-image-genericUpgrade linux-image-6.8.0-48-generic-64kUpgrade linux-image-lowlatency-hwe-24.04Upgrade linux-image-nvidia-64k-hwe-22.04Upgrade linux-image-virtual-hwe-22.04Upgrade linux-image-ibmUpgrade linux-image-azureUpgrade linux-image-oem-22.04cUpgrade linux-image-lowlatency-64k-hwe-22.04Upgrade linux-image-6.8.0-48-lowlatencyUpgrade linux-image-gkeUpgrade linux-image-raspiUpgrade linux-image-6.8.0-1017-nvidiaUpgrade linux-image-nvidia-6.8Upgrade linux-image-generic-lpaeUpgrade linux-image-generic-64kUpgrade linux-image-lowlatencyUpgrade linux-image-oem-22.04Upgrade linux-image-oem-24.04Upgrade linux-image-lowlatency-64kUpgrade linux-image-nvidiaUpgrade linux-image-oem-22.04aUpgrade linux-image-6.8.0-1016-azure-fdeUpgrade linux-image-6.8.0-1018-awsUpgrade linux-image-ibm-lts-24.04Upgrade linux-image-oem-22.04bUpgrade linux-image-6.8.0-1014-ibmUpgrade linux-image-6.8.0-1016-oemUpgrade linux-image-oracleUpgrade linux-image-oem-22.04dUpgrade linux-image-nvidia-64k-6.8Upgrade linux-image-gcpUpgrade linux-image-6.8.0-48-genericUpgrade linux-image-kvmUpgrade linux-image-nvidia-lowlatencyUpgrade linux-image-generic-hwe-22.04Upgrade linux-image-azure-fdeUpgrade linux-image-6.8.0-1017-nvidia-64kUpgrade linux-image-generic-64k-hwe-24.04Upgrade linux-image-generic-64k-hwe-22.04Upgrade linux-image-oracle-64kUpgrade linux-image-6.8.0-1017-azure-fdeUpgrade linux-image-6.8.0-1017-azureUpgrade linux-image-6.8.0-1017-nvidia-lowlatency-64kUpgrade linux-image-lowlatency-64k-hwe-24.04Upgrade linux-image-6.8.0-48-lowlatency-64kUpgrade linux-image-oem-24.04aUpgrade linux-image-nvidia-lowlatency-64kUpgrade linux-image-6.8.0-1016-azureUpgrade linux-image-6.8.0-1015-oracle-64kUpgrade linux-image-awsUpgrade linux-image-nvidia-hwe-22.04Upgrade linux-image-nvidia-64kUpgrade linux-image-virtualUpgrade linux-image-6.8.0-1017-gcpUpgrade linux-image-6.8.0-1014-raspiUpgrade linux-image-generic-hwe-24.04Upgrade linux-image-6.8.0-1017-nvidia-lowlatency | Nov 4, 2024 | Jul 29, 2024 |
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