CVE-2024-41004: tracing: Build event generation tests only as modules

Published Jul 12, 2024
·
Updated

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

tracing: Build event generation tests only as modules

The kprobes and synth event generation test modules add events and lock (get a reference) those event file reference in module init function, and unlock and delete it in module exit function. This is because those are designed for playing as modules.

If we make those modules as built-in, those events are left locked in the kernel, and never be removed. This causes kprobe event self-test failure as below.

[ 97.349708] ------------[ cut here ]------------ [ 97.353453] WARNING: CPU: 3 PID: 1 at kernel/trace/tracekprobe.c:2133 kprobetraceselftestsinit+0x3f1/0x480 [ 97.357106] Modules linked in: [ 97.358488] CPU: 3 PID: 1 Comm: swapper/0 Not tainted 6.9.0-g699646734ab5-dirty #14 [ 97.361556] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014 [ 97.363880] RIP: 0010:kprobetraceselftestsinit+0x3f1/0x480 [ 97.365538] Code: a8 24 08 82 e9 ae fd ff ff 90 0f 0b 90 48 c7 c7 e5 aa 0b 82 e9 ee fc ff ff 90 0f 0b 90 48 c7 c7 2d 61 06 82 e9 8e fd ff ff 90 <0f> 0b 90 48 c7 c7 33 0b 0c 82 89 c6 e8 6e 03 1f ff 41 ff c7 e9 90 [ 97.370429] RSP: 0000:ffffc90000013b50 EFLAGS: 00010286 [ 97.371852] RAX: 00000000fffffff0 RBX: ffff888005919c00 RCX: 0000000000000000 [ 97.373829] RDX: ffff888003f40000 RSI: ffffffff8236a598 RDI: ffff888003f40a68 [ 97.375715] RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000000 [ 97.377675] R10: ffffffff811c9ae5 R11: ffffffff8120c4e0 R12: 0000000000000000 [ 97.379591] R13: 0000000000000001 R14: 0000000000000015 R15: 0000000000000000 [ 97.381536] FS: 0000000000000000(0000) GS:ffff88807dcc0000(0000) knlGS:0000000000000000 [ 97.383813] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 97.385449] CR2: 0000000000000000 CR3: 0000000002244000 CR4: 00000000000006b0 [ 97.387347] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 97.389277] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 97.391196] Call Trace: [ 97.391967] <TASK> [ 97.392647] ? warn+0xcc/0x180 [ 97.393640] ? kprobetraceselftestsinit+0x3f1/0x480 [ 97.395181] ? reportbug+0xbd/0x150 [ 97.396234] ? handlebug+0x3e/0x60 [ 97.397311] ? excinvalidop+0x1a/0x50 [ 97.398434] ? asmexcinvalidop+0x1a/0x20 [ 97.399652] ? tracekprobeisbusy+0x20/0x20 [ 97.400904] ? tracingresetallonlinecpus+0x15/0x90 [ 97.402304] ? kprobetraceselftestsinit+0x3f1/0x480 [ 97.403773] ? initkprobetrace+0x50/0x50 [ 97.404972] dooneinitcall+0x112/0x240 [ 97.406113] doinitcalllevel+0x95/0xb0 [ 97.407286] ? kernelinit+0x1a/0x1a0 [ 97.408401] doinitcalls+0x3f/0x70 [ 97.409452] kernelinitfreeable+0x16f/0x1e0 [ 97.410662] ? restinit+0x1f0/0x1f0 [ 97.411738] kernelinit+0x1a/0x1a0 [ 97.412788] retfromfork+0x39/0x50 [ 97.413817] ? restinit+0x1f0/0x1f0 [ 97.414844] retfromforkasm+0x11/0x20 [ 97.416285] </TASK> [ 97.417134] irq event stamp: 13437323 [ 97.418376] hardirqs last enabled at (13437337): [<ffffffff8110bc0c>] consoleunlock+0x11c/0x150 [ 97.421285] hardirqs last disabled at (13437370): [<ffffffff8110bbf1>] consoleunlock+0x101/0x150 [ 97.423838] softirqs last enabled at (13437366): [<ffffffff8108e17f>] handlesoftirqs+0x23f/0x2a0 [ 97.426450] softirqs last disabled at (13437393): [<ffffffff8108e346>] irqexitrcu+0x66/0xd0 [ 97.428850] ---[ end trace 0000000000000000 ]---

And also, since we can not cleanup dynamicevent file, ftracetest are failed too.

To avoid these issues, build these tests only as modules.

Affected Software

11 affected componentsFixes available
debian/linux
5.10.223-15.10.234-16.1.129-16.1.135-16.12.22-16.12.25-1
debian/linux-6.1
6.1.129-1~deb11u1
Linux Linux kernel>=5.6<5.10.221
Linux Linux kernel>=5.11<5.15.162
Linux Linux kernel>=5.16<6.1.96
Linux Linux kernel>=6.2<6.6.36
Linux Linux kernel>=6.7<6.9.7
Linux Linux kernel=6.10-rc1
Linux Linux kernel=6.10-rc2
Linux Linux kernel=6.10-rc3
Linux Linux kernel=6.10-rc4

Event History

Jul 12, 2024
CVE Published
via MITRE·12:44 PM
Data Sourced
via MITRE·12:44 PM
Description
Data Sourced
via NVD·01:15 PM
Description
Data Sourced
via NVD·01:15 PM
RemedySeverityAffected Software
Apr 27, 2025
Data Sourced
via Ubuntu·06:16 PM
RemedyDescriptionSeverityAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2024-41004?

CVE-2024-41004 has been classified as a medium severity vulnerability.

2

How do I fix CVE-2024-41004?

To fix CVE-2024-41004, upgrade your Linux kernel to the patched versions: 5.10.223-1, 5.10.226-1, 6.1.123-1, 6.1.119-1, 6.12.11-1, or 6.12.12-1.

3

Which systems are affected by CVE-2024-41004?

CVE-2024-41004 affects specific versions of the Linux kernel provided by Debian.

4

What type of vulnerability is CVE-2024-41004?

CVE-2024-41004 is a vulnerability relating to event generation in the Linux kernel tracing subsystem.

5

Is there a public reference for CVE-2024-41004?

Yes, CVE-2024-41004 has public references available in the form of commits on the official Linux kernel Git.

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