CVE-2022-50379
MediumIn 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.
CVSS 3.1 score
4.7
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H
Weakness type
CWE-362CVE-2022-50379 is a Race Condition vulnerability
What is Race Condition?
The product contains a code sequence that can run concurrently with other code, creating unexpected states. Learn more on MITRE CWE
Affected versions
Linux kernel versions
4.17
and later are affected. Fixed in
4.19.262,
5.4.220,
5.10.150,
5.15.75,
5.19.17,
6.0.3,
6.1
and their respective stable series.
References
The following references provide additional information about CVE-2022-50379 including vendor advisories, patch commits, exploit details, and third-party analysis. Links are sourced from the NIST NVD database.
-
PatchKernel patch commithttps://git.kernel.org/stable/c/0efd9dfc00d677a1d0929319a6103cb2dfc41c22
-
PatchKernel patch commithttps://git.kernel.org/stable/c/26b7c0ac49a3eea15559c9d84863736a6d1164b4
-
PatchKernel patch commithttps://git.kernel.org/stable/c/331cd9461412e103d07595a10289de90004ac890
Frequently asked questions
-
What is CVE-2022-50379?
CVE-2022-50379 is a Medium severity Linux kernel vulnerability with a CVSS score of 4.7 out of 10 , classified as a Race Condition flaw (CWE-362) . It affects Linux kernel versions from 4.17 onward and has been patched in 4.19.262, 5.4.220, 5.10.150 and others. CVE-2022-50379 has not been confirmed as actively exploited and is not listed in the CISA KEV catalog.
-
What is the CVSS score for CVE-2022-50379?
CVE-2022-50379 has a CVSS score of 4.7 out of 10, rated Medium severity (CVSS 3.1). The vector string is
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H. -
Is there a patch available for CVE-2022-50379?
Yes — CVE-2022-50379 has been patched. Fixed versions include 4.19.262, 5.4.220, 5.10.150 and others. If you are running Linux kernel 4.17 or later up to the fix versions, apply the relevant patch for your kernel branch.
-
Is CVE-2022-50379 actively exploited?
No — CVE-2022-50379 has not been confirmed as actively exploited. It is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog.
-
What is Race Condition (CWE-362)?
The product contains a code sequence that can run concurrently with other code, creating unexpected states. View CWE-362 on MITRE CWE →