CVE-2025-40259 scsi: sg: Do not sleep in atomic context

Not scored Published Updated

A local attacker can cause a system crash or hang by triggering a sleep in atomic context within the Linux kernel's SCSI generic driver.

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

CVE-2025-40259 is a denial of service vulnerability in Linux, published on 4 Dec 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:

scsi: sg: Do not sleep in atomic context

sg_finish_rem_req() calls blk_rq_unmap_user(). The latter function may sleep. Hence, call sg_finish_rem_req() with interrupts enabled instead of disabled.

Which versions are affected by CVE-2025-40259?

How do I fix CVE-2025-40259?

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-2025-40259 being exploited?

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

Sources

Also known as AZL-71386, BELL-CVE-2025-40259, DEBIAN-CVE-2025-40259, GHSA-4cjv-m44p-782f, ROOT-OS-DEBIAN-11-CVE-2025-40259, ROOT-OS-DEBIAN-12-CVE-2025-40259 and 4 more.

Is CVE-2025-40259 in your software?

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

Check your SBOMs for free