CVE-2022-49033

btrfs: qgroup: fix sleep from invalid context bug in btrfs_qgroup_inherit()

No CVSS score yet EPSS 0.25%

Published 21 Oct 2024 Updated 11 May 2026 CNA: Linux

Check your servers for CVE-2022-49033

The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2022-49033 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.

Check my servers

Description

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

btrfs: qgroup: fix sleep from invalid context bug in btrfs_qgroup_inherit()

Syzkaller reported BUG as follows:

BUG: sleeping function called from invalid context at include/linux/sched/mm.h:274 Call Trace: <TASK> dump_stack_lvl+0xcd/0x134 __might_resched.cold+0x222/0x26b kmem_cache_alloc+0x2e7/0x3c0 update_qgroup_limit_item+0xe1/0x390 btrfs_qgroup_inherit+0x147b/0x1ee0 create_subvol+0x4eb/0x1710 btrfs_mksubvol+0xfe5/0x13f0 __btrfs_ioctl_snap_create+0x2b0/0x430 btrfs_ioctl_snap_create_v2+0x25a/0x520 btrfs_ioctl+0x2a1c/0x5ce0 __x64_sys_ioctl+0x193/0x200 do_syscall_64+0x35/0x80

Fix this by calling qgroup_dirty() on @dstqgroup, and update limit item in btrfs_run_qgroups() later outside of the spinlock context.

Exploitation

EPSS 0.25%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 17.3% of all scored CVEs. Scores of 1 Dec 2026.

The assessment of CISA (SSVC, 22 Oct 2024):

Exploitation
none: CISA did not find evidence of exploitation or a public proof of concept
Automatable
no: each attack takes manual steps
Technical impact
partial: limited control or limited data

Affected products

As the CNA lists them.

ProductVersions
Linux
affected from e8c8541ac379709db8d2339e1cb720469fc2cd8f, before 89840b12c8fad7200eb6478525c13261512c01be
affected from e8c8541ac379709db8d2339e1cb720469fc2cd8f, before 3c98e91be6aea4c7acf09da6eb0c107ea9186bb5
affected from e8c8541ac379709db8d2339e1cb720469fc2cd8f, before f4b930a1602b05e77fee31f9616599b25e910a86
affected from e8c8541ac379709db8d2339e1cb720469fc2cd8f, before 8eb912af525042a7365295eb62f6d5270c2a6462
affected from e8c8541ac379709db8d2339e1cb720469fc2cd8f, before 01d7c41eac9129fba80d8aed0060caab4a7dbe09
affected from e8c8541ac379709db8d2339e1cb720469fc2cd8f, before 044da1a371a0da579e805e89c96865f62d8f6f69
affected from e8c8541ac379709db8d2339e1cb720469fc2cd8f, before 588ae4fdd8b11788a797776b10d6c44ae12bc133
affected from e8c8541ac379709db8d2339e1cb720469fc2cd8f, before f7e942b5bb35d8e3af54053d19a6bf04143a3955
Other versions: unaffected
Linux
affected 4.1
unaffected before 4.1
unaffected from 4.9.335 up to and including 4.9.*
unaffected from 4.14.301 up to and including 4.14.*
unaffected from 4.19.268 up to and including 4.19.*
unaffected from 5.4.226 up to and including 5.4.*
unaffected from 5.10.158 up to and including 5.10.*
unaffected from 5.15.82 up to and including 5.15.*
unaffected from 6.0.12 up to and including 6.0.*
unaffected 6.1 and later
Other versions: affected

Is my server affected?

This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:

uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2022-49033 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2022-49033

With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:

trivy rootfs --scanners vuln / | grep CVE-2022-49033
trivy image --scanners vuln IMAGE | grep CVE-2022-49033

Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.

References

Other references

Source: the record CVE-2022-49033 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.