CVE-2024-38577 rcu-tasks: Fix show_rcu_tasks_trace_gp_kthread buffer overflow

High 7.0 Published Updated

A buffer overflow in the Linux kernel's RCU tasks tracing allows potential code execution or denial of service if counters are excessively large.

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

CVE-2024-38577 is a high-severity memory corruption vulnerability in Linux kernel, published on 19 Jun 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:

rcu-tasks: Fix show_rcu_tasks_trace_gp_kthread buffer overflow

There is a possibility of buffer overflow in show_rcu_tasks_trace_gp_kthread() if counters, passed to sprintf() are huge. Counter numbers, needed for this are unrealistically high, but buffer overflow is still possible.

Use snprintf() with buffer size instead of sprintf().

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Weakness: CWE-120

Which versions are affected by CVE-2024-38577?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2024-38577?

Apply the vendor's patch.

Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.

Is CVE-2024-38577 being exploited?

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

All Linux kernel vulnerabilities

Sources

Also known as AZL-47261, BELL-CVE-2024-38577, DEBIAN-CVE-2024-38577, GHSA-wqp9-f35v-h4f9, UBUNTU-CVE-2024-38577.

Is CVE-2024-38577 in your software?

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

Check your SBOMs for free