CVE-2022-49849 btrfs: fix match incorrectly in dev_args_match_device
A logic error in the Linux kernel's Btrfs filesystem allows triggering a failed assertion via ioctl, leading to a denial of service.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2022-49849?
CVE-2022-49849 is a medium-severity vulnerability in Linux kernel, published on 1 May 2025. It can only be exploited from the same machine or local network, with no action from the victim.
Official description
In the Linux kernel, the following vulnerability has been resolved:
btrfs: fix match incorrectly in dev_args_match_device
syzkaller found a failed assertion:
assertion failed: (args->devid != (u64)-1) || args->missing, in fs/btrfs/volumes.c:6921
This can be triggered when we set devid to (u64)-1 by ioctl. In this case, the match of devid will be skipped and the match of device may succeed incorrectly.
Patch 562d7b1512f7 introduced this function which is used to match device. This function contains two matching scenarios, we can distinguish them by checking the value of args->missing rather than check whether args->devid and args->uuid is default value.
Which versions are affected by CVE-2022-49849?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2022-49849?
Apply the vendor's patch.
Is CVE-2022-49849 being exploited?
There is no known exploitation of CVE-2022-49849 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as DEBIAN-CVE-2022-49849, GHSA-c7fj-w636-m5xx, UBUNTU-CVE-2022-49849.