CVE-2024-57838 s390/entry: Mark IRQ entries to fix stack depot warnings

High 7.1 Published Updated

A missing section marking in the s390 Linux kernel prevents stack trace filtering, potentially exhausting stack depot memory and causing warnings or denial of service.

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

CVE-2024-57838 is a high-severity denial of service vulnerability in Linux kernel, published on 11 Jan 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:

s390/entry: Mark IRQ entries to fix stack depot warnings

The stack depot filters out everything outside of the top interrupt context as an uninteresting or irrelevant part of the stack traces. This helps with stack trace de-duplication, avoiding an explosion of saved stack traces that share the same IRQ context code path but originate from different randomly interrupted points, eventually exhausting the stack depot.

Filtering uses in_irqentry_text() to identify functions within the .irqentry.text and .softirqentry.text sections, which then become the last stack trace entries being saved.

While __do_softirq() is placed into the .softirqentry.text section by common code, populating .irqentry.text is architecture-specific.

Currently, the .irqentry.text section on s390 is empty, which prevents stack depot filtering and de-duplication and could result in warnings like:

Stack depot reached limit capacity WARNING: CPU: 0 PID: 286113 at lib/stackdepot.c:252 depot_alloc_stack+0x39a/0x3c8

with PREEMPT and KASAN enabled.

Fix this by moving the IO/EXT interrupt handlers from .kprobes.text into the .irqentry.text section and updating the kprobes blacklist to include the .irqentry.text section.

This is done only for asynchronous interrupts and explicitly not for program checks, which are synchronous and where the context beyond the program check is important to preserve. Despite machine checks being somewhat in between, they are extremely rare, and preserving context when possible is also of value.

SVCs and Restart Interrupts are not relevant, one being always at the boundary to user space and the other being a one-time thing.

IRQ entries filtering is also optionally used in ftrace function graph, where the same logic applies.

Weakness: CWE-668

Which versions are affected by CVE-2024-57838?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2024-57838?

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-57838 being exploited?

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

All Linux kernel vulnerabilities

Sources

Also known as BELL-CVE-2024-57838, DEBIAN-CVE-2024-57838, GHSA-f386-w386-pj3f, ROOT-OS-DEBIAN-11-CVE-2024-57838, UBUNTU-CVE-2024-57838.

Is CVE-2024-57838 in your software?

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

Check your SBOMs for free