Vulnerability · Published Sep 18, 2025 · Assigned by Linux
CVE-2022-50379btrfs: fix race between quota enable and quota rescan ioctl
Medium 4.7
In plain English
A medium-severity race condition 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.1% (higher than 1% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
In the Linux kernel, the following vulnerability has been resolved: btrfs: fix race between quota enable and quota rescan ioctl When enabling quotas, at btrfs_quota_enable(), after committing the transaction, we change fs_info->quota_root to point to the quota root we created and set BTRFS_FS_QUOTA_ENABLED at fs_info->flags. Then we try to start the qgroup rescan worker, first by initializing it with a call to qgroup_rescan_init() - however if that fails we end up freeing the quota root but we leave fs_info->quota_root still pointing to it, this can later result in a use-after-free somewhere else. We have previously set the flags BTRFS_FS_QUOTA_ENABLED and BTRFS_QGROUP_STATUS_FLAG_ON, so we can only fail with -EINPROGRESS at btrfs_quota_enable(), which is possible if someone already called the quota rescan ioctl, and therefore started the rescan worker. So fix this by ignoring an -EINPROGRESS and asserting we can't get any other error.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | linux | 6.0.3-1 | DEBIAN-CVE-2022-50379 |
| Debian:13 | linux | 6.0.3-1 | DEBIAN-CVE-2022-50379 |
| Debian:14 | linux | 6.0.3-1 | DEBIAN-CVE-2022-50379 |
| Ubuntu:22.04:LTS | linux | 5.15.0-60.66 | UBUNTU-CVE-2022-50379 |
| Ubuntu:22.04:LTS | linux-allwinner-5.19 | no fix listed | UBUNTU-CVE-2022-50379 |
| Ubuntu:22.04:LTS | linux-aws | 5.15.0-1030.34 | UBUNTU-CVE-2022-50379 |
| Ubuntu:22.04:LTS | linux-aws-5.19 | no fix listed | UBUNTU-CVE-2022-50379 |
| Ubuntu:22.04:LTS | linux-aws-6.2 | no fix listed | UBUNTU-CVE-2022-50379 |
| Ubuntu:22.04:LTS | linux-aws-6.5 | no fix listed | UBUNTU-CVE-2022-50379 |
| Ubuntu:22.04:LTS | linux-azure | 5.15.0-1033.40 | UBUNTU-CVE-2022-50379 |
| Ubuntu:22.04:LTS | linux-azure-5.19 | no fix listed | UBUNTU-CVE-2022-50379 |
| Ubuntu:24.04:LTS | linux-azure-6.11 | no fix listed | UBUNTU-CVE-2022-50379 |
| Ubuntu:22.04:LTS | linux-azure-6.2 | no fix listed | UBUNTU-CVE-2022-50379 |
| Ubuntu:22.04:LTS | linux-azure-6.5 | no fix listed | UBUNTU-CVE-2022-50379 |
| Ubuntu:22.04:LTS | linux-azure-fde | 5.15.0-1033.40.1 | UBUNTU-CVE-2022-50379 |
| Ubuntu:22.04:LTS | linux-azure-fde-5.19 | no fix listed | UBUNTU-CVE-2022-50379 |
| Ubuntu:22.04:LTS | linux-azure-fde-6.2 | no fix listed | UBUNTU-CVE-2022-50379 |
| Ubuntu:22.04:LTS | linux-gcp | 5.15.0-1029.36 | UBUNTU-CVE-2022-50379 |
| Ubuntu:22.04:LTS | linux-gcp-5.19 | no fix listed | UBUNTU-CVE-2022-50379 |
| Ubuntu:24.04:LTS | linux-gcp-6.11 | no fix listed | UBUNTU-CVE-2022-50379 |
| Ubuntu:22.04:LTS | linux-gcp-6.2 | no fix listed | UBUNTU-CVE-2022-50379 |
| Ubuntu:22.04:LTS | linux-gcp-6.5 | no fix listed | UBUNTU-CVE-2022-50379 |
| Ubuntu:22.04:LTS | linux-gke | 5.15.0-1027.32 | UBUNTU-CVE-2022-50379 |
| Ubuntu:22.04:LTS | linux-gkeop | 5.15.0-1015.19 | UBUNTU-CVE-2022-50379 |
| Ubuntu:22.04:LTS | linux-hwe-5.19 | no fix listed | UBUNTU-CVE-2022-50379 |
| Ubuntu:24.04:LTS | linux-hwe-6.11 | no fix listed | UBUNTU-CVE-2022-50379 |
| Ubuntu:22.04:LTS | linux-hwe-6.2 | no fix listed | UBUNTU-CVE-2022-50379 |
| Ubuntu:22.04:LTS | linux-hwe-6.5 | no fix listed | UBUNTU-CVE-2022-50379 |
| Ubuntu:22.04:LTS | linux-ibm | 5.15.0-1025.28 | UBUNTU-CVE-2022-50379 |
| Ubuntu:24.04:LTS | linux-intel | no fix listed | UBUNTU-CVE-2022-50379 |
| Ubuntu:22.04:LTS | linux-intel-iot-realtime | no fix listed | UBUNTU-CVE-2022-50379 |
| Ubuntu:22.04:LTS | linux-intel-iotg | 5.15.0-1025.30 | UBUNTU-CVE-2022-50379 |
| Ubuntu:22.04:LTS | linux-kvm | 5.15.0-1028.33 | UBUNTU-CVE-2022-50379 |
| Ubuntu:22.04:LTS | linux-lowlatency | 5.15.0-60.66 | UBUNTU-CVE-2022-50379 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-5.19 | no fix listed | UBUNTU-CVE-2022-50379 |
| Ubuntu:24.04:LTS | linux-lowlatency-hwe-6.11 | no fix listed | UBUNTU-CVE-2022-50379 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.2 | no fix listed | UBUNTU-CVE-2022-50379 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.5 | no fix listed | UBUNTU-CVE-2022-50379 |
| Ubuntu:22.04:LTS | linux-nvidia | 5.15.0-1017.17 | UBUNTU-CVE-2022-50379 |
| Ubuntu:22.04:LTS | linux-nvidia-6.2 | no fix listed | UBUNTU-CVE-2022-50379 |
| Ubuntu:22.04:LTS | linux-nvidia-6.5 | no fix listed | UBUNTU-CVE-2022-50379 |
| Ubuntu:22.04:LTS | linux-oem-5.17 | no fix listed | UBUNTU-CVE-2022-50379 |
| Ubuntu:22.04:LTS | linux-oem-6.0 | no fix listed | UBUNTU-CVE-2022-50379 |
| Ubuntu:22.04:LTS | linux-oem-6.1 | no fix listed | UBUNTU-CVE-2022-50379 |
| Ubuntu:24.04:LTS | linux-oem-6.11 | no fix listed | UBUNTU-CVE-2022-50379 |
| Ubuntu:22.04:LTS | linux-oem-6.5 | no fix listed | UBUNTU-CVE-2022-50379 |
| Ubuntu:24.04:LTS | linux-oem-6.8 | no fix listed | UBUNTU-CVE-2022-50379 |
| Ubuntu:22.04:LTS | linux-oracle | 5.15.0-1029.35 | UBUNTU-CVE-2022-50379 |
| Ubuntu:22.04:LTS | linux-oracle-6.5 | no fix listed | UBUNTU-CVE-2022-50379 |
| Ubuntu:22.04:LTS | linux-raspi | 5.15.0-1024.26 | UBUNTU-CVE-2022-50379 |
| Ubuntu:24.04:LTS | linux-raspi-realtime | no fix listed | UBUNTU-CVE-2022-50379 |
| Ubuntu:22.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2022-50379 |
| Ubuntu:24.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2022-50379 |
| Ubuntu:22.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2022-50379 |
| Ubuntu:24.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2022-50379 |
| Ubuntu:22.04:LTS | linux-riscv-5.19 | no fix listed | UBUNTU-CVE-2022-50379 |
| Ubuntu:22.04:LTS | linux-riscv-6.5 | no fix listed | UBUNTU-CVE-2022-50379 |
| Ubuntu:22.04:LTS | linux-starfive-5.19 | no fix listed | UBUNTU-CVE-2022-50379 |
| Ubuntu:22.04:LTS | linux-starfive-6.2 | no fix listed | UBUNTU-CVE-2022-50379 |
| Ubuntu:22.04:LTS | linux-starfive-6.5 | no fix listed | UBUNTU-CVE-2022-50379 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | 5d23515be66904fa3b1b5d6bd72d2199cd2447ab – before c97f6d528c3f1c83a6b792a8a7928c236c80b8fe5d23515be66904fa3b1b5d6bd72d2199cd2447ab – before 26b7c0ac49a3eea15559c9d84863736a6d1164b45d23515be66904fa3b1b5d6bd72d2199cd2447ab – before 47b5ffe86332af95f0f52be0a63d4da7c2b37b555d23515be66904fa3b1b5d6bd72d2199cd2447ab – before 4b996a3014ef014af8f97b60c35f5289210a47205d23515be66904fa3b1b5d6bd72d2199cd2447ab – before 0efd9dfc00d677a1d0929319a6103cb2dfc41c225d23515be66904fa3b1b5d6bd72d2199cd2447ab – before 6c22f86dd221eba0c7af645b1af73dcbc04ee27b5d23515be66904fa3b1b5d6bd72d2199cd2447ab – before 331cd9461412e103d07595a10289de90004ac890 |
| Linux | Linux | 4.17 |
Weakness: CWE-362 · Vector: CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H
References
- https://git.kernel.org/stable/c/c97f6d528c3f1c83a6b792a8a7928c236c80b8fe
- https://git.kernel.org/stable/c/26b7c0ac49a3eea15559c9d84863736a6d1164b4
- https://git.kernel.org/stable/c/47b5ffe86332af95f0f52be0a63d4da7c2b37b55
- https://git.kernel.org/stable/c/4b996a3014ef014af8f97b60c35f5289210a4720
- https://git.kernel.org/stable/c/0efd9dfc00d677a1d0929319a6103cb2dfc41c22
- https://git.kernel.org/stable/c/6c22f86dd221eba0c7af645b1af73dcbc04ee27b
- https://git.kernel.org/stable/c/331cd9461412e103d07595a10289de90004ac890