LiveActive security incident?Get immediate response
CVE Record

CVE-2022-50379: btrfs: fix race between quota enable and quota rescan ioctl

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.

MediumCVSS 4.7Not KEV-listedUpdated
Glexia's TakeAutomated analysismoderate

Security readout for executives and security teams

Plain-English summary

This is a Linux kernel Btrfs bug that can leave the filesystem quota state pointing at freed memory. A local user may be able to trigger a crash or denial of service under specific timing conditions. The source data does not show active exploitation.

Executive priority

Treat this as a moderate operational stability risk, not an internet-facing emergency. Prioritize patching on shared Linux systems, multi-user servers, and hosts using Btrfs quotas. Normal kernel maintenance windows are appropriate unless local untrusted users are present.

Technical view

CVE-2022-50379 is a race condition in Btrfs quota enablement versus quota rescan ioctl handling. If qgroup rescan initialization fails with an in-progress state, quota_root could be freed while fs_info->quota_root still references it, creating a potential use-after-free and availability impact.

Likely exposure

Exposure is limited to Linux systems running affected kernel versions with Btrfs functionality relevant to quotas and rescans. The attack vector is local, requires low privileges, and has high complexity. Confirm actual exposure through distribution kernel advisories because vendor backports may change version-based conclusions.

Exploitation context

The CVE record marks this as not in CISA KEV, and the provided sources do not cite active exploitation. CVSS 3.1 is 4.7, reflecting local access, high attack complexity, low privileges, no confidentiality or integrity impact, and high availability impact.

Researcher notes

The key condition is the race between btrfs_quota_enable() and quota rescan initialization. The fix behavior described is to ignore -EINPROGRESS and assert no other error. Sources do not provide exploit proof, affected distributions, or non-patch mitigations.

Mitigation direction

  • Apply Linux kernel or distribution updates containing the referenced Btrfs fix.
  • Prioritize systems using Btrfs quotas or quota rescan workflows.
  • Check distribution advisories for backported fixes before relying on upstream version numbers.
  • Restrict local shell access to trusted users where feasible.
  • If patching is delayed, monitor vendor guidance for operational workarounds.

Validation and detection

  • Inventory Linux hosts using Btrfs filesystems and quota features.
  • Record kernel versions and compare them with vendor security advisories.
  • Confirm installed kernels include the relevant stable fix or distribution backport.
  • Review crash, oops, or filesystem logs for Btrfs quota-related instability.
  • Track remediation status separately for upstream kernels and distribution kernels.
Prepared
Confidence
high
Sources
9

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cwe · low confidence lookup

CWE-362: Exact CWE lookup

Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2022-50379 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
Medium
CVSS
4.7 (3.1)
Known Exploited
No
Published

Vector: CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

1CVSS vectors
0Timeline events
0ADP providers
8Source links

CVSS vector scores

1 official score

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
4.7CVSS 3.1MediumCVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H13.6Primary CVE score

Vulnerability scoring details

Base CVSS 3.1 score

4.7Medium
CVSS 3.1 vector shape for CVE-2022-50379Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

Vector: CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone
Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
LinuxLinux5d23515be66904fa3b1b5d6bd72d2199cd2447ab, 5d23515be66904fa3b1b5d6bd72d2199cd2447ab, 5d23515be66904fa3b1b5d6bd72d2199cd2447ab, 5d23515be66904fa3b1b5d6bd72d2199cd2447ab, 5d23515be66904fa3b1b5d6bd72d2199cd2447ab, 5d23515be66904fa3b1b5d6bd72d2199cd2447ab, 5d23515be66904fa3b1b5d6bd72d2199cd2447abunaffected
LinuxLinux4.17, 0, 4.19.262, 5.4.220, 5.10.150, 5.15.75, 5.19.17, 6.0.3, 6.1affected
Weakness

CWE details

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.

CWE-362 · source CWE mapping

Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')

Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition') represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.