CVE-2024-56610: kcsan: Turn report_filterlist_lock into a raw_spinlock

Published Dec 27, 2024
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

kcsan: Turn reportfilterlistlock into a rawspinlock

Ran Xiaokai reports that with a KCSAN-enabled PREEMPTRT kernel, we can see splats like:

| BUG: sleeping function called from invalid context at kernel/locking/spinlockrt.c:48 | inatomic(): 1, irqsdisabled(): 1, nonblock: 0, pid: 0, name: swapper/1 | preemptcount: 10002, expected: 0 | RCU nest depth: 0, expected: 0 | no locks held by swapper/1/0. | irq event stamp: 156674 | hardirqs last enabled at (156673): [<ffffffff81130bd9>] doidle+0x1f9/0x240 | hardirqs last disabled at (156674): [<ffffffff82254f84>] sysvecapictimerinterrupt+0x14/0xc0 | softirqs last enabled at (0): [<ffffffff81099f47>] copyprocess+0xfc7/0x4b60 | softirqs last disabled at (0): [<0000000000000000>] 0x0 | Preemption disabled at: | [<ffffffff814a3e2a>] paintptr+0x2a/0x90 | CPU: 1 UID: 0 PID: 0 Comm: swapper/1 Not tainted 6.11.0+ #3 | Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.0-0-ga698c8995f-prebuilt.qemu.org 04/01/2014 | Call Trace: | <IRQ> | dumpstacklvl+0x7e/0xc0 | dumpstack+0x1d/0x30 | mightresched+0x1a2/0x270 | rtspinlock+0x68/0x170 | kcsanskipreportdebugfs+0x43/0xe0 | printreport+0xb5/0x590 | kcsanreportknownorigin+0x1b1/0x1d0 | kcsansetupwatchpoint+0x348/0x650 | tsanunalignedwrite1+0x16d/0x1d0 | hrtimerinterrupt+0x3d6/0x430 | sysvecapictimerinterrupt+0xe8/0x3a0 | sysvecapictimerinterrupt+0x97/0xc0 | </IRQ>

On a detected data race, KCSAN's reporting logic checks if it should filter the report. That list is protected by the reportfilterlistlock non-raw spinlock which may sleep on RT kernels.

Since KCSAN may report data races in any context, convert it to a rawspinlock.

This requires being careful about when to allocate memory for the filter list itself which can be done via KCSAN's debugfs interface. Concurrent modification of the filter list via debugfs should be rare: the chosen strategy is to optimistically pre-allocate memory before the critical section and discard if unused.

Other sources

This CVE was automatically created from a reference found in an email or other text. If you are reading this, then this CVE entry is probably erroneous, since this text should be replaced by the official CVE description automatically.

Launchpad

Affected Software

8 affected componentsFixes available
Linux Linux kernel
debian/linux<=5.10.223-1
5.10.234-16.1.129-16.1.135-16.12.27-1
debian/linux-6.1
6.1.129-1~deb11u1
Linux Linux kernel>=5.8<5.10.231
Linux Linux kernel>=5.11<5.15.174
Linux Linux kernel>=5.16<6.1.120
Linux Linux kernel>=6.2<6.6.66
Linux Linux kernel>=6.7<6.12.5

Event History

Dec 27, 2024
CVE Published
via MITRE·02:51 PM
Data Sourced
via MITRE·02:51 PM
Description
Data Sourced
via NVD·03:15 PM
Description
Data Sourced
via NVD·03:15 PM
RemedySeverityAffected Software
Mar 31, 2025
Data Sourced
via Launchpad·06:46 PM
Description
May 2, 2025
Data Sourced
via Ubuntu·06:52 PM
RemedyDescriptionSeverityAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2024-56610?

CVE-2024-56610 is considered a high-severity vulnerability due to its impact on kernel stability in KCSAN-enabled PREEMPT_RT environments.

2

How do I fix CVE-2024-56610?

To fix CVE-2024-56610, update your Linux kernel to the latest stable version where this vulnerability has been patched.

3

What systems are affected by CVE-2024-56610?

CVE-2024-56610 affects Linux kernels that are compiled with KCSAN and PREEMPT_RT enabled.

4

What kind of exploit is associated with CVE-2024-56610?

CVE-2024-56610 could be exploited to cause kernel crashes or unexpected behavior due to improper locking mechanisms.

5

Who reported the CVE-2024-56610 vulnerability?

The vulnerability CVE-2024-56610 was reported by Ran Xiaokai.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203