CVE-2022-49412 Information
Description
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:
Fix the problem by checking that the parent of the two bfqqs we are merging in bfq_setup_merge() is the same.
Reference
https://git.kernel.org/stable/c/5ee21edaed09e6b25f2c007b3f326752bc89bacf https://git.kernel.org/stable/c/7d172b9dc913e161d8ff88770eea01701ff553de https://git.kernel.org/stable/c/8abc8763b11c35e03cc91d59fd0cd28d39f88ca9 https://git.kernel.org/stable/c/97be7d13fbd4001eeab49b1be6399f23a8c66160 https://git.kernel.org/stable/c/a16c65cca7d2c7ff965fdd3adc8df2156529caf1 https://git.kernel.org/stable/c/c1cee4ab36acef271be9101590756ed0c0c374d9
Share on: