CVE-2025-22068 ublk: make sure ubq->canceling is set when queue is frozen

High 7.8 Published Updated

A use-after-free vulnerability in the Linux kernel's ublk driver allows attackers to potentially execute code or escalate privileges via io_uring commands.

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-2025-22068?

CVE-2025-22068 is a high-severity use after free vulnerability in Linux kernel, published on 16 Apr 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:

ublk: make sure ubq->canceling is set when queue is frozen

Now ublk driver depends on `ubq->canceling` for deciding if the request can be dispatched via uring_cmd & io_uring_cmd_complete_in_task().

Once ubq->canceling is set, the uring_cmd can be done via ublk_cancel_cmd() and io_uring_cmd_done().

So set ubq->canceling when queue is frozen, this way makes sure that the flag can be observed from ublk_queue_rq() reliably, and avoids use-after-free on uring_cmd.

Weakness: CWE-416

Which versions are affected by CVE-2025-22068?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2025-22068?

Apply the vendor's patch.

Upgrade to the fixed version. These bugs are found with fuzzing and sanitisers and avoided by memory-safe languages. More about Use after free.

Is CVE-2025-22068 being exploited?

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

All Linux kernel vulnerabilities

Sources

Also known as BELL-CVE-2025-22068, DEBIAN-CVE-2025-22068, GHSA-5vwg-96q8-mm82, ROOT-OS-UBUNTU-2404-CVE-2025-22068, UBUNTU-CVE-2025-22068.

Is CVE-2025-22068 in your software?

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

Check your SBOMs for free