CVE-2024-56584 io_uring/tctx: work around xa_store() allocation error issue

Medium 5.5 Published Updated

A local attacker can trigger a kernel warning and potential instability in the Linux kernel's io_uring subsystem by exploiting memory allocation failures.

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-2024-56584?

CVE-2024-56584 is a medium-severity denial of service vulnerability in Linux kernel, published on 27 Dec 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:

io_uring/tctx: work around xa_store() allocation error issue

syzbot triggered the following WARN_ON:

WARNING: CPU: 0 PID: 16 at io_uring/tctx.c:51 __io_uring_free+0xfa/0x140 io_uring/tctx.c:51

which is the

WARN_ON_ONCE(!xa_empty(&tctx->xa));

sanity check in __io_uring_free() when a io_uring_task is going through its final put. The syzbot test case includes injecting memory allocation failures, and it very much looks like xa_store() can fail one of its memory allocations and end up with ->head being non-NULL even though no entries exist in the xarray.

Until this issue gets sorted out, work around it by attempting to iterate entries in our xarray, and WARN_ON_ONCE() if one is found.

Weakness: CWE-770

Which versions are affected by CVE-2024-56584?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2024-56584?

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-2024-56584 being exploited?

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

All Linux kernel vulnerabilities

Sources

Also known as BELL-CVE-2024-56584, DEBIAN-CVE-2024-56584, GHSA-v34r-xh7h-7w9g, ROOT-OS-DEBIAN-11-CVE-2024-56584, ROOT-OS-UBUNTU-2204-CVE-2024-56584, UBUNTU-CVE-2024-56584.

Is CVE-2024-56584 in your software?

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

Check your SBOMs for free