Skip to content
OpenAdvisories
High · 7.8 CVE-2022-49761 EUVD-2022-55162GHSA-2x8g-m7hp-f3x8

btrfs: always report error in run_one_delayed_ref()

Published Mar 27, 2025 · Updated May 11, 2026 · Assigned by Linux

Vendor: Linux Product: Linux Package: linux Package: linux Package: linux-allwinner-5.19 Package: linux-aws Package: linux-aws-5.0 Package: linux-aws-5.11 Package: linux-aws-5.13 Package: linux-aws-5.15 Package: linux-aws-5.19 Package: linux-aws-5.3 Package: linux-aws-5.4 Package: linux-aws-5.8 Package: linux-aws-6.2 Package: linux-aws-6.5 Package: linux-aws-fips Package: linux-aws-hwe Package: linux-azure Package: linux-azure-4.15 Package: linux-azure-5.11 Package: linux-azure-5.13 Package: linux-azure-5.15 Package: linux-azure-5.19 Package: linux-azure-5.3 Package: linux-azure-5.4 Package: linux-azure-5.8 Package: linux-azure-6.2 Package: linux-azure-6.5 Package: linux-azure-edge Package: linux-azure-fde Package: linux-azure-fde-5.19 Package: linux-azure-fde-6.2 Package: linux-azure-fips Package: linux-bluefield Package: linux-fips Package: linux-gcp Package: linux-gcp-4.15 Package: linux-gcp-5.11 Package: linux-gcp-5.13 Package: linux-gcp-5.15 Package: linux-gcp-5.19 Package: linux-gcp-5.3 Package: linux-gcp-5.4 Package: linux-gcp-5.8 Package: linux-gcp-6.2 Package: linux-gcp-6.5 Package: linux-gcp-fips Package: linux-gke Package: linux-gke-4.15 Package: linux-gke-5.15 Package: linux-gke-5.4 Package: linux-gkeop Package: linux-gkeop-5.15 Package: linux-gkeop-5.4 Package: linux-hwe Package: linux-hwe-5.11 Package: linux-hwe-5.13 Package: linux-hwe-5.15 Package: linux-hwe-5.19 Package: linux-hwe-5.4 Package: linux-hwe-5.8 Package: linux-hwe-6.2 Package: linux-hwe-6.5 Package: linux-hwe-edge Package: linux-ibm Package: linux-ibm-5.4 Package: linux-intel-5.13 Package: linux-intel-iot-realtime Package: linux-intel-iotg Package: linux-intel-iotg-5.15 Package: linux-iot Package: linux-kvm Package: linux-lowlatency Package: linux-lowlatency-hwe-5.15 Package: linux-lowlatency-hwe-5.19 Package: linux-lowlatency-hwe-6.2 Package: linux-lowlatency-hwe-6.5 Package: linux-lts-xenial Package: linux-nvidia Package: linux-nvidia-6.2 Package: linux-nvidia-6.5 Package: linux-nvidia-tegra-5.15 Package: linux-oem Package: linux-oem-5.10 Package: linux-oem-5.13 Package: linux-oem-5.14 Package: linux-oem-5.17 Package: linux-oem-5.6 Package: linux-oem-6.0 Package: linux-oem-6.1 Package: linux-oem-6.5 Package: linux-oracle Package: linux-oracle-5.0 Package: linux-oracle-5.11 Package: linux-oracle-5.13 Package: linux-oracle-5.15 Package: linux-oracle-5.3 Package: linux-oracle-5.4 Package: linux-oracle-5.8 Package: linux-oracle-6.5 Package: linux-raspi Package: linux-raspi-5.4 Package: linux-raspi-realtime Package: linux-raspi2 Package: linux-realtime Package: linux-riscv Package: linux-riscv-5.11 Package: linux-riscv-5.15 Package: linux-riscv-5.19 Package: linux-riscv-5.8 Package: linux-riscv-6.5 Package: linux-starfive-5.19 Package: linux-starfive-6.2 Package: linux-starfive-6.5 Package: linux-vmware Package: linux-xilinx-zynqmp Platform: Linux Ecosystem: Debian Ecosystem: Ubuntu

Description

In the Linux kernel, the following vulnerability has been resolved:

btrfs: always report error in run_one_delayed_ref()

Currently we have a btrfs_debug() for run_one_delayed_ref() failure, but
if end users hit such problem, there will be no chance that
btrfs_debug() is enabled. This can lead to very little useful info for
debugging.

This patch will:

- Add extra info for error reporting
Including:
* logical bytenr
* num_bytes
* type
* action
* ref_mod

- Replace the btrfs_debug() with btrfs_err()

- Move the error reporting into run_one_delayed_ref()
This is to avoid use-after-free, the @node can be freed in the caller.

This error should only be triggered at most once.

As if run_one_delayed_ref() failed, we trigger the error message, then
causing the call chain to error out:

btrfs_run_delayed_refs()
`- btrfs_run_delayed_refs()
`- btrfs_run_delayed_refs_for_head()
`- run_one_delayed_ref()

And we will abort the current transaction in btrfs_run_delayed_refs().
If we have to run delayed refs for the abort transaction,
run_one_delayed_ref() will just cleanup the refs and do nothing, thus no
new error messages would be output.

Affected products

VendorProductAffectedFixed
Linux Linux 3.4 5.10.165

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 linux 6.1.8-1 —
Debian 13 linux 6.1.8-1 —
Debian 12 linux 6.1.8-1 —
ReleasePackageFixed inAdvisory
Ubuntu Nvidia-BlueField 22.04 LTS linux-bluefield 5.15.0-1015.17 —
Ubuntu 24.04 LTS linux-realtime +1 No fix yet —
Ubuntu 22.04 LTS linux +1 5.15.0-70.77 —
Ubuntu 22.04 LTS linux-aws 5.15.0-1034.38 —
Ubuntu 22.04 LTS linux-azure 5.15.0-1036.43 —
Ubuntu 22.04 LTS linux-azure-fde 5.15.0-1036.43.1 —
Ubuntu 22.04 LTS linux-gcp 5.15.0-1032.40 —
Ubuntu 22.04 LTS linux-gke +1 5.15.0-1031.36 —
Ubuntu 22.04 LTS linux-gkeop 5.15.0-1018.23 —
Ubuntu 22.04 LTS linux-ibm 5.15.0-1028.31 —
Ubuntu 22.04 LTS linux-intel-iotg 5.15.0-1028.33 —
Ubuntu 22.04 LTS linux-nvidia 5.15.0-1023.23 —
Ubuntu 22.04 LTS linux-oracle 5.15.0-1033.39 —
Ubuntu 22.04 LTS linux-raspi 5.15.0-1027.29 —
Ubuntu 22.04 LTS linux-riscv +31 No fix yet —
Ubuntu 20.04 LTS linux-aws-5.15 5.15.0-1034.38~20.04.1 —
Ubuntu 20.04 LTS linux-azure-5.15 5.15.0-1036.43~20.04.1 —
Ubuntu 20.04 LTS linux-gcp-5.15 5.15.0-1032.40~20.04.1 —
Ubuntu 20.04 LTS linux-gke +28 No fix yet —
Ubuntu 20.04 LTS linux-hwe-5.15 +1 5.15.0-70.77~20.04.1 —
Ubuntu 20.04 LTS linux-intel-iotg-5.15 5.15.0-1030.35~20.04.1 —
Ubuntu 20.04 LTS linux-nvidia-tegra-5.15 5.15.0-1014.14~20.04.1 —
Ubuntu 20.04 LTS linux-oracle-5.15 5.15.0-1033.39~20.04.1 —
Ubuntu 20.04 LTS linux-riscv-5.15 5.15.0-1031.35~20.04.1 —
Ubuntu 18.04 LTS linux-gcp +14 No fix yet —
Show 12 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu 16.04 LTS linux-hwe-edge No fix yet —
Ubuntu Pro Realtime 22.04 LTS linux-intel-iot-realtime 5.15.0-1024.29 —
Ubuntu Pro Realtime 22.04 LTS linux-realtime 5.15.0-1036.39 —
Ubuntu Pro FIPS 20.04 LTS linux-fips +3 No fix yet —
Ubuntu Pro FIPS 18.04 LTS linux-fips +3 No fix yet —
Ubuntu Pro FIPS 16.04 LTS linux-fips No fix yet —
Ubuntu Pro FIPS-updates 20.04 LTS linux-fips +3 No fix yet —
Ubuntu Pro FIPS-updates 18.04 LTS linux-fips +3 No fix yet —
Ubuntu Pro FIPS-updates 16.04 LTS linux-fips No fix yet —
Ubuntu Pro 20.04 LTS linux +10 No fix yet —
Ubuntu Pro 18.04 LTS linux +12 No fix yet —
Ubuntu Pro 16.04 LTS linux +7 No fix yet —
Ubuntu Pro 14.04 LTS linux +3 No fix yet —
ReleasePackageFixed inAdvisory
SLES 12 SP5 kernel-syms +2 4.12.14-122.261.1 SUSE-SU-2025:01983-1
Show 1 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
SLE Live Patching 12 SP5 kernel-default 4.12.14-122.261.1 SUSE-SU-2025:01983-1
SLE Live Patching 12 SP5 kgraft-patch-SLE12-SP5_Update_69 1-8.3.1 SUSE-SU-2025:01983-1

Advisories 2

References