{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2022-50379","id":"CVE-2022-50379","title":"btrfs: fix race between quota enable and quota rescan ioctl","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nbtrfs: fix race between quota enable and quota rescan ioctl\n\nWhen enabling quotas, at btrfs_quota_enable(), after committing the\ntransaction, we change fs_info->quota_root to point to the quota root we\ncreated and set BTRFS_FS_QUOTA_ENABLED at fs_info->flags. Then we try\nto start the qgroup rescan worker, first by initializing it","descriptionLong":"In the Linux kernel, the following vulnerability has been resolved:\n\nbtrfs: fix race between quota enable and quota rescan ioctl\n\nWhen enabling quotas, at btrfs_quota_enable(), after committing the\ntransaction, we change fs_info->quota_root to point to the quota root we\ncreated and set BTRFS_FS_QUOTA_ENABLED at fs_info->flags. Then we try\nto start the qgroup rescan worker, first by initializing it with a call\nto qgroup_rescan_init() - however if that fails we end up freeing the\nquota root but we leave fs_info->quota_root still pointing to it, this\ncan later result in a use-after-free somewhere else.\n\nWe have previously set the flags BTRFS_FS_QUOTA_ENABLED and\nBTRFS_QGROUP_STATUS_FLAG_ON, so we can only fail with -EINPROGRESS at\nbtrfs_quota_enable(), which is possible if someone already called the\nquota rescan ioctl, and therefore started the rescan worker.\n\nSo fix this by ignoring an -EINPROGRESS and asserting we can't get any\nother error.","published":"2025-09-18T13:33:01.502Z","updated":"2026-10-28T02:31:03.034154454Z","reserved":"2025-09-17T14:53:06.996Z","status":"Modified","rejected":false,"assigner":"Linux","metric":{"version":"3.1","score":4.7,"vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H","rating":"medium","source":"NVD"},"metrics":[{"version":"3.1","score":4.7,"vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H","rating":"medium","source":"NVD"},{"version":"3.1","score":4.7,"vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H","rating":"medium","source":"CISA-ADP"},{"version":"3.1","score":4.7,"vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H","rating":"medium","source":"OSV"}],"rating":"medium","products":["Linux"],"affectedProducts":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"5d23515be66904fa3b1b5d6bd72d2199cd2447ab","lessThan":"c97f6d528c3f1c83a6b792a8a7928c236c80b8fe","status":"affected","versionType":"git"},{"version":"5d23515be66904fa3b1b5d6bd72d2199cd2447ab","lessThan":"26b7c0ac49a3eea15559c9d84863736a6d1164b4","status":"affected","versionType":"git"},{"version":"5d23515be66904fa3b1b5d6bd72d2199cd2447ab","lessThan":"47b5ffe86332af95f0f52be0a63d4da7c2b37b55","status":"affected","versionType":"git"},{"version":"5d23515be66904fa3b1b5d6bd72d2199cd2447ab","lessThan":"4b996a3014ef014af8f97b60c35f5289210a4720","status":"affected","versionType":"git"},{"version":"5d23515be66904fa3b1b5d6bd72d2199cd2447ab","lessThan":"0efd9dfc00d677a1d0929319a6103cb2dfc41c22","status":"affected","versionType":"git"},{"version":"5d23515be66904fa3b1b5d6bd72d2199cd2447ab","lessThan":"6c22f86dd221eba0c7af645b1af73dcbc04ee27b","status":"affected","versionType":"git"},{"version":"5d23515be66904fa3b1b5d6bd72d2199cd2447ab","lessThan":"331cd9461412e103d07595a10289de90004ac890","status":"affected","versionType":"git"}],"platforms":[]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"4.17","status":"affected"},{"version":"0","lessThan":"4.17","status":"unaffected","versionType":"semver"},{"version":"4.19.262","lessThanOrEqual":"4.19.*","status":"unaffected","versionType":"semver"},{"version":"5.4.220","lessThanOrEqual":"5.4.*","status":"unaffected","versionType":"semver"},{"version":"5.10.150","lessThanOrEqual":"5.10.*","status":"unaffected","versionType":"semver"},{"version":"5.15.75","lessThanOrEqual":"5.15.*","status":"unaffected","versionType":"semver"},{"version":"5.19.17","lessThanOrEqual":"5.19.*","status":"unaffected","versionType":"semver"},{"version":"6.0.3","lessThanOrEqual":"6.0.*","status":"unaffected","versionType":"semver"},{"version":"6.1","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}],"platforms":[]}],"packages":[],"cwes":["CWE-362"],"aliases":[],"references":[{"url":"https://git.kernel.org/stable/c/c97f6d528c3f1c83a6b792a8a7928c236c80b8fe","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/26b7c0ac49a3eea15559c9d84863736a6d1164b4","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/47b5ffe86332af95f0f52be0a63d4da7c2b37b55","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/4b996a3014ef014af8f97b60c35f5289210a4720","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/0efd9dfc00d677a1d0929319a6103cb2dfc41c22","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/6c22f86dd221eba0c7af645b1af73dcbc04ee27b","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/331cd9461412e103d07595a10289de90004ac890","tags":["Patch","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50379.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-50379","tags":["advisory"]},{"url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","tags":["package"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial"},"epss":0.00115,"epssPercentile":0.01626,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2022-50379","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-50379","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2022-50379","ok":true,"note":"0 packages"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2022-50379","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}