CVE-2022-48846 block: release rq qos structures for queue without disk

Medium 5.5 Published Updated

A memory leak in the Linux kernel block layer can lead to resource exhaustion and denial of service when queues lack associated disks.

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-48846?

CVE-2022-48846 is a medium-severity denial of service vulnerability in Linux kernel, published on 16 Jul 2024. 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:

block: release rq qos structures for queue without disk

blkcg_init_queue() may add rq qos structures to request queue, previously blk_cleanup_queue() calls rq_qos_exit() to release them, but commit 8e141f9eb803 ("block: drain file system I/O on del_gendisk") moves rq_qos_exit() into del_gendisk(), so memory leak is caused because queues may not have disk, such as un-present scsi luns, nvme admin queue, ...

Fixes the issue by adding rq_qos_exit() to blk_cleanup_queue() back.

BTW, v5.18 won't need this patch any more since we move blkcg_init_queue()/blkcg_exit_queue() into disk allocation/release handler, and patches have been in for-5.18/block.

Weakness: CWE-401

Which versions are affected by CVE-2022-48846?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2022-48846?

Apply the vendor's patch.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2022-48846 being exploited?

There is no known exploitation of CVE-2022-48846 in the wild and no public exploit code.

All Linux kernel vulnerabilities

Sources

Also known as DEBIAN-CVE-2022-48846, GHSA-73j8-r39c-jxp6, ROOT-OS-UBUNTU-2404-CVE-2022-48846, UBUNTU-CVE-2022-48846.

Is CVE-2022-48846 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free