# CVE-2024-46788: tracing/osnoise: Use a cpumask to know what threads are kthreads

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.32% (percentile 18, 2026-11-28)
- **CWE:** CWE-476
- **Published:** 2024-09-18T07:12:44.352Z
- **Modified:** 2026-08-05T11:38:34.219Z

## Who should check

- Anyone running Linux \>= e88ed227f639ebcb31ed4e5b88756b47d904584b, \< 7a5f01828edf152c144d27cf63de446fdf2dc222; \>= e88ed227f639ebcb31ed4e5b88756b47d904584b, \< 27282d2505b402f39371fd60d19d95c01a4b6776; \>= e88ed227f639ebcb31ed4e5b88756b47d904584b, \< 177e1cc2f41235c145041eed03ef5bab18f32328
- Anyone running Linux 6.5

## Description

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

tracing/osnoise: Use a cpumask to know what threads are kthreads

The start\_kthread() and stop\_thread() code was not always called with the
interface\_lock held. This means that the kthread variable could be
unexpectedly changed causing the kthread\_stop() to be called on it when it
should not have been, leading to:

 while true; do
   rtla timerlat top -u -q & PID=$!;
   sleep 5;
   kill -INT $PID;
   sleep 0.001;
   kill -TERM $PID;
   wait $PID;
  done

Causing the following OOPS:

 Oops: general protection fault, probably for non-canonical address 0xdffffc0000000002: 0000 \[\#1\] PREEMPT SMP KASAN PTI
 KASAN: null-ptr-deref in range \[0x0000000000000010-0x0000000000000017\]
 CPU: 5 UID: 0 PID: 885 Comm: timerlatu/5 Not tainted 6.11.0-rc4-test-00002-gbc754cc76d1b-dirty \#125 a533010b71dab205ad2f507188ce8c82203b0254
 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
 RIP: 0010:hrtimer\_active+0x58/0x300
 Code: 48 c1 ee 03 41 54 48 01 d1 48 01 d6 55 53 48 83 ec 20 80 39 00 0f 85 30 02 00 00 49 8b 6f 30 4c 8d 75 10 4c 89 f0 48 c1 e8 03 \<0f\> b6 3c 10 4c 89 f0 83 e0 07 83 c0 03 40 38 f8 7c 09 40 84 ff 0f
 RSP: 0018:ffff88811d97f940 EFLAGS: 00010202
 RAX: 0000000000000002 RBX: ffff88823c6b5b28 RCX: ffffed10478d6b6b
 RDX: dffffc0000000000 RSI: ffffed10478d6b6c RDI: ffff88823c6b5b28
 RBP: 0000000000000000 R08: ffff88823c6b5b58 R09: ffff88823c6b5b60
 R10: ffff88811d97f957 R11: 0000000000000010 R12: 00000000000a801d
 R13: ffff88810d8b35d8 R14: 0000000000000010 R15: ffff88823c6b5b28
 FS:  0000000000000000(0000) GS:ffff88823c680000(0000) knlGS:0000000000000000
 CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
 CR2: 0000561858ad7258 CR3: 000000007729e001 CR4: 0000000000170ef0
 Call Trace:
  \<TASK\>
  ? die\_addr+0x40/0xa0
  ? exc\_general\_protection+0x154/0x230
  ? asm\_exc\_general\_protection+0x26/0x30
  ? hrtimer\_active+0x58/0x300
  ? \_\_pfx\_mutex\_lock+0x10/0x10
  ? \_\_pfx\_locks\_remove\_file+0x10/0x10
  hrtimer\_cancel+0x15/0x40
  timerlat\_fd\_release+0x8e/0x1f0
  ? security\_file\_release+0x43/0x80
  \_\_fput+0x372/0xb10
  task\_work\_run+0x11e/0x1f0
  ? \_raw\_spin\_lock+0x85/0xe0
  ? \_\_pfx\_task\_work\_run+0x10/0x10
  ? poison\_slab\_object+0x109/0x170
  ? do\_exit+0x7a0/0x24b0
  do\_exit+0x7bd/0x24b0
  ? \_\_pfx\_migrate\_enable+0x10/0x10
  ? \_\_pfx\_do\_exit+0x10/0x10
  ? \_\_pfx\_read\_tsc+0x10/0x10
  ? ktime\_get+0x64/0x140
  ? \_raw\_spin\_lock\_irq+0x86/0xe0
  do\_group\_exit+0xb0/0x220
  get\_signal+0x17ba/0x1b50
  ? vfs\_read+0x179/0xa40
  ? timerlat\_fd\_read+0x30b/0x9d0
  ? \_\_pfx\_get\_signal+0x10/0x10
  ? \_\_pfx\_timerlat\_fd\_read+0x10/0x10
  arch\_do\_signal\_or\_restart+0x8c/0x570
  ? \_\_pfx\_arch\_do\_signal\_or\_restart+0x10/0x10
  ? vfs\_read+0x179/0xa40
  ? ksys\_read+0xfe/0x1d0
  ? \_\_pfx\_ksys\_read+0x10/0x10
  syscall\_exit\_to\_user\_mode+0xbc/0x130
  do\_syscall\_64+0x74/0x110
  ? \_\_pfx\_\_\_rseq\_handle\_notify\_resume+0x10/0x10
  ? \_\_pfx\_ksys\_read+0x10/0x10
  ? fpregs\_restore\_userregs+0xdb/0x1e0
  ? fpregs\_restore\_userregs+0xdb/0x1e0
  ? syscall\_exit\_to\_user\_mode+0x116/0x130
  ? do\_syscall\_64+0x74/0x110
  ? do\_syscall\_64+0x74/0x110
  ? do\_syscall\_64+0x74/0x110
  entry\_SYSCALL\_64\_after\_hwframe+0x71/0x79
 RIP: 0033:0x7ff0070eca9c
 Code: Unable to access opcode bytes at 0x7ff0070eca72.
 RSP: 002b:00007ff006dff8c0 EFLAGS: 00000246 ORIG\_RAX: 0000000000000000
 RAX: 0000000000000000 RBX: 0000000000000005 RCX: 00007ff0070eca9c
 RDX: 0000000000000400 RSI: 00007ff006dff9a0 RDI: 0000000000000003
 RBP: 00007ff006dffde0 R08: 0000000000000000 R09: 00007ff000000ba0
 R10: 00007ff007004b08 R11: 0000000000000246 R12: 0000000000000003
 R13: 00007ff006dff9a0 R14: 0000000000000007 R15: 0000000000000008
  \</TASK\>
 Modules linked in: snd\_hda\_intel snd\_intel\_dspcfg snd\_intel\_sdw\_acpi snd\_hda\_codec snd\_hwdep snd\_hda\_core
 ---\[ end trace 0000000000000000 \]---

This is because it would mistakenly call kthread\_stop() on a user space
thread making it "exit" before it actually exits.

Since kthread
---truncated---

## Affected and fixed versions

- Linux: \>= e88ed227f639ebcb31ed4e5b88756b47d904584b, \< 7a5f01828edf152c144d27cf63de446fdf2dc222; \>= e88ed227f639ebcb31ed4e5b88756b47d904584b, \< 27282d2505b402f39371fd60d19d95c01a4b6776; \>= e88ed227f639ebcb31ed4e5b88756b47d904584b, \< 177e1cc2f41235c145041eed03ef5bab18f32328 (cvelist)
- Linux: 6.5 (cvelist)

## Mitigation

- Upgrade Linux to 177e1cc2f41235c145041eed03ef5bab18f32328 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2024-46788. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-46788.md
Affected: Linux >= e88ed227f639ebcb31ed4e5b88756b47d904584b, < 7a5f01828edf152c144d27cf63de446fdf2dc222; >= e88ed227f639ebcb31ed4e5b88756b47d904584b, < 27282d2505b402f39371fd60d19d95c01a4b6776; >= e88ed227f639ebcb31ed4e5b88756b47d904584b, < 177e1cc2f41235c145041eed03ef5bab18f32328; Linux 6.5
Fixed in: Linux 7a5f01828edf152c144d27cf63de446fdf2dc222, Linux 27282d2505b402f39371fd60d19d95c01a4b6776, Linux 177e1cc2f41235c145041eed03ef5bab18f32328

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2024-46788 being exploited?

There is no confirmed exploitation: CVE-2024-46788 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.32% chance of exploitation in the next 30 days (as of 2026-11-28).

### How serious is CVE-2024-46788?

High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2024-46788?

Linux \>= e88ed227f639ebcb31ed4e5b88756b47d904584b, \< 7a5f01828edf152c144d27cf63de446fdf2dc222; \>= e88ed227f639ebcb31ed4e5b88756b47d904584b, \< 27282d2505b402f39371fd60d19d95c01a4b6776; \>= e88ed227f639ebcb31ed4e5b88756b47d904584b, \< 177e1cc2f41235c145041eed03ef5bab18f32328; Linux 6.5.

### Is there a fix for CVE-2024-46788?

Yes. Fixed in Linux 7a5f01828edf152c144d27cf63de446fdf2dc222, Linux 27282d2505b402f39371fd60d19d95c01a4b6776, Linux 177e1cc2f41235c145041eed03ef5bab18f32328. Upgrade Linux to 177e1cc2f41235c145041eed03ef5bab18f32328 or later.

### How do I check if I'm affected by CVE-2024-46788?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/7a5f01828edf152c144d27cf63de446fdf2dc222>
- patch: <https://git.kernel.org/stable/c/27282d2505b402f39371fd60d19d95c01a4b6776>
- patch: <https://git.kernel.org/stable/c/177e1cc2f41235c145041eed03ef5bab18f32328>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2024-46788>

HTML: <https://flawdb.com/CVE-2024-46788> · JSON: <https://flawdb.com/api/v1/entries/CVE-2024-46788>
