# CVE-2026-139558: sched: Set TIF\_NEED\_RESCHED before calling \_\_trace\_set\_need\_resched()

- **Severity:** UNSCORED
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Unknown
- **Published:** 2026-11-30T13:35:52.291Z
- **Modified:** 2026-11-30T14:19:36.457Z

## Who should check

- Anyone running Linux \>= adcc3bfa8806761ac21aa271f78454113ec6936e, \< cce90cef0abc44caab7c2c5a6e775424537ffa84; \>= adcc3bfa8806761ac21aa271f78454113ec6936e, \< d9079e8eb14188f57d6553a7433ced6875c83711; \>= adcc3bfa8806761ac21aa271f78454113ec6936e, \< 53bc5c556b82a3ca32b62ba349c4511f91526b9f
- Anyone running Linux 6.17

## Description

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

sched: Set TIF\_NEED\_RESCHED before calling \_\_trace\_set\_need\_resched()

set\_tsk\_need\_resched() tests TIF\_NEED\_RESCHED, calls
\_\_trace\_set\_need\_resched() if the flag is clear, then sets it via
set\_tsk\_thread\_flag().  A BPF raw\_tp program attached to
sched\_set\_need\_resched executes synchronously inside \_\_bpf\_trace\_run().
On return, \_\_bpf\_trace\_run() drops the RCU lock with
rcu\_read\_unlock\_migrate(), which on the preempt-or-BH-disabled path
calls set\_need\_resched\_current() -\> set\_tsk\_need\_resched() again.

set\_tsk\_thread\_flag() follows the tracepoint call, so every re-entrant
frame sees TIF\_NEED\_RESCHED clear and calls \_\_trace\_set\_need\_resched()
again:

  BUG: TASK stack guard page was hit at ffffc9001224ff98
  Oops: stack guard page: 0000 \[\#1\] SMP KASAN PTI
  RIP: 0010:\_\_bpf\_trace\_sched\_set\_need\_resched\_tp+0x1c/0x190
  Call Trace:
   trace\_sched\_set\_need\_resched\_tp+0x110/0x130
   set\_tsk\_need\_resched include/linux/sched.h:2076
   set\_need\_resched\_current include/linux/sched.h:2094
   rcu\_read\_unlock\_special+0x43a/0x440
   \_\_rcu\_read\_unlock+0x9e/0x120
   rcu\_read\_unlock\_migrate+0xa9/0x240
   \_\_bpf\_trace\_run+0x131/0x180
   bpf\_trace\_run3+0x333/0x430
   \_\_bpf\_trace\_sched\_set\_need\_resched\_tp+0x13a/0x190
   trace\_sched\_set\_need\_resched\_tp+0x110/0x130
   set\_tsk\_need\_resched include/linux/sched.h:2076
   ...

\_\_resched\_curr() has the same ordering, firing the tracepoint before
setting the flag via set\_ti\_thread\_flag() or set\_nr\_and\_not\_polling().
Fix it for consistency.

Replace the separate test\_tsk\_thread\_flag() + set\_tsk\_thread\_flag() pair
in set\_tsk\_need\_resched() with test\_and\_set\_tsk\_thread\_flag().  In
\_\_resched\_curr(), move the tracepoint call after the flag is set in
each path.

## Affected and fixed versions

- Linux: \>= adcc3bfa8806761ac21aa271f78454113ec6936e, \< cce90cef0abc44caab7c2c5a6e775424537ffa84; \>= adcc3bfa8806761ac21aa271f78454113ec6936e, \< d9079e8eb14188f57d6553a7433ced6875c83711; \>= adcc3bfa8806761ac21aa271f78454113ec6936e, \< 53bc5c556b82a3ca32b62ba349c4511f91526b9f (cvelist)
- Linux: 6.17 (cvelist)

## Technologies

Linux kernel

## Mitigation

- Upgrade Linux to 53bc5c556b82a3ca32b62ba349c4511f91526b9f or later.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2026-139558.md
Affected: Linux >= adcc3bfa8806761ac21aa271f78454113ec6936e, < cce90cef0abc44caab7c2c5a6e775424537ffa84; >= adcc3bfa8806761ac21aa271f78454113ec6936e, < d9079e8eb14188f57d6553a7433ced6875c83711; >= adcc3bfa8806761ac21aa271f78454113ec6936e, < 53bc5c556b82a3ca32b62ba349c4511f91526b9f; Linux 6.17
Fixed in: Linux 53bc5c556b82a3ca32b62ba349c4511f91526b9f

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-2026-139558 being exploited?

There is no confirmed exploitation: CVE-2026-139558 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known.

### How serious is CVE-2026-139558?

It has no CVSS score yet. Unknown.

### Which versions are affected by CVE-2026-139558?

Linux \>= adcc3bfa8806761ac21aa271f78454113ec6936e, \< cce90cef0abc44caab7c2c5a6e775424537ffa84; \>= adcc3bfa8806761ac21aa271f78454113ec6936e, \< d9079e8eb14188f57d6553a7433ced6875c83711; \>= adcc3bfa8806761ac21aa271f78454113ec6936e, \< 53bc5c556b82a3ca32b62ba349c4511f91526b9f; Linux 6.17.

### Is there a fix for CVE-2026-139558?

Yes. Fixed in Linux 53bc5c556b82a3ca32b62ba349c4511f91526b9f. Upgrade Linux to 53bc5c556b82a3ca32b62ba349c4511f91526b9f or later.

### How do I check if I'm affected by CVE-2026-139558?

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

- other: <https://git.kernel.org/stable/c/cce90cef0abc44caab7c2c5a6e775424537ffa84>
- other: <https://git.kernel.org/stable/c/d9079e8eb14188f57d6553a7433ced6875c83711>
- other: <https://git.kernel.org/stable/c/53bc5c556b82a3ca32b62ba349c4511f91526b9f>

## 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-2026-139558>

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