CVE-2022-49412·Kernel vulnerability
In the Linux kernel, the following vulnerability has been resolved: bfq: Avoid merging queues with different parents It can happen that the parent of a bfqq changes between the moment we decide two queues are worth to merge (and set bic->stable_merge_bfqq) and the moment bfq_setup_merge() is called. This can happen e.g. because the process submitted IO for a different cgroup and thus bfqq got reparented. It can even happen that the bfqq we are merging with has parent cgroup that is already offline and going to be destroyed in which case the merge can lead to use-after-free issues such as: BUG: KASAN: use-after-free in __bfq_deactivate_entity+0x9cb/0xa50 Read of size 8 at addr ffff88800693c0c0 by task runc:[2:INIT]/10544 CPU: 0 PID: 10544 Comm: runc:[2:INIT] Tainted: G E 5.15.2-0.g5fb85fd-default #1 openSUSE Tumbleweed (unreleased) f1f3b891c72369aebecd2e43e4641a6358867c70 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a-rebuilt.opensuse.org 04/01/2014 Call Trace: <IRQ> dump_stack_lvl+0x46/0x5a print_address_description.constprop.0+0x1f/0x140 ? __bfq_deactivate_entity+0x9cb/0xa50 kasan_report.cold+0x7f/0x11b ? __bfq_deactivate_entity+0x9cb/0xa50 __bfq_deactivate_entity+0x9cb/0xa50 ? update_curr+0x32f/0x5d0 bfq_deactivate_entity+0xa0/0x1d0 bfq_del_bfqq_busy+0x28a/0x420 ? resched_curr+0x116/0x1d0 ? bfq_requeue_bfqq+0x70/0x70 ? check_preempt_wakeup+0x52b/0xbc0 __bfq_bfqq_expire+0x1a2/0x270 bfq_bfqq_expire+0xd16/0x2160 ? try_to_wake_up+0x4ee/0x1260 ? bfq_end_wr_async_queues+0xe0/0xe0 ? _raw_write_unlock_bh+0x60/0x60 ? _raw_spin_lock_irq+0x81/0xe0 bfq_idle_slice_timer+0x109/0x280 ? bfq_dispatch_request+0x4870/0x4870 __hrtimer_run_queues+0x37d/0x700 ? enqueue_hrtimer+0x1b0/0x1b0 ? kvm_clock_get_cycles+0xd/0x10 ? ktime_get_update_offsets_now+0x6f/0x280 hrtimer_interrupt+0x2c8/0x740 Fix the problem by checking that the parent of the two bfqqs we are merging in bfq_setup_merge() is the same.
- Severity
- high
- Software
- Kernel
- Fixed in
- 5.18.3
- Published
- 2025-02-26
Affected versions
From: 5.18
Until: 5.18.3
Fixed in: 5.18.3
How to fix this CVE
Update your Linux kernel to version 5.18.3 or later to resolve a use-after-free vulnerability in the BFQ I/O scheduler that can occur when process cgroups change during queue merge operations. This vulnerability may lead to kernel crashes or memory corruption when workloads span multiple cgroups. Apply the patch immediately to systems running kernel versions 5.18 through 5.18.2.
sudo dnf update kernelDefensia detects this vulnerability
How to check if you are affected
- Step 1: Check installed kernel version with `uname -r` and compare against 5.18.0 through 5.18.2
- Step 2: Verify if BFQ scheduler is active by running `cat /sys/block/*/queue/scheduler | grep bfq` or `grep CONFIG_BFQ_GROUP_IOSCHED /boot/config-$(uname -r)`
- Step 3: Search system logs for use-after-free KASAN errors with `sudo journalctl -xe | grep -i 'use-after-free\|__bfq_deactivate_entity\|KASAN'`
- Step 4: After kernel update and reboot, run `uname -r` to confirm version is 5.18.3 or later
FAQ
What is CVE-2022-49412?
CVE-2022-49412 is a use-after-free vulnerability in the Linux kernel's BFQ I/O scheduler that occurs when merging I/O queues whose parent cgroups change or become offline. This can lead to kernel memory corruption and crashes.
Is CVE-2022-49412 being actively exploited?
No, CVE-2022-49412 is not listed on the CISA Known Exploited Vulnerabilities catalog and no public exploits are currently available. However, it can be triggered through normal workload behavior.
What versions of Kernel are affected by CVE-2022-49412?
Linux kernel versions 5.18.0 through 5.18.2 are affected. The fix was released in kernel 5.18.3.
How do I check if my server is vulnerable to CVE-2022-49412?
Run `uname -r` to check your kernel version. If it shows 5.18.0, 5.18.1, or 5.18.2, your system is vulnerable. Additionally, run `grep CONFIG_BFQ_GROUP_IOSCHED /boot/config-$(uname -r)` to confirm BFQ is enabled.
Does Defensia detect CVE-2022-49412?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If the Linux kernel is installed on a monitored server running versions 5.18.0-5.18.2, CVE-2022-49412 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2022-49412. Free for 1 server.
Get started free