# CVE-2025-38522: sched/ext: Prevent update_locked_rq() calls with NULL rq

- Severity: Medium 5.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.16%, higher than 5% of CVEs (2026-12-01)
- Published: 2025-08-16T11:12:11.304Z
- Modified: 2026-06-17T09:17:02.310Z
- Weaknesses: CWE-476
- Assigned by: Linux

## Description

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

sched/ext: Prevent update_locked_rq() calls with NULL rq

Avoid invoking update_locked_rq() when the runqueue (rq) pointer is NULL
in the SCX_CALL_OP and SCX_CALL_OP_RET macros.

Previously, calling update_locked_rq(NULL) with preemption enabled could
trigger the following warning:

    BUG: using __this_cpu_write() in preemptible [00000000]

This happens because __this_cpu_write() is unsafe to use in preemptible
context.

rq is NULL when an ops invoked from an unlocked context. In such cases, we
don't need to store any rq, since the value should already be NULL
(unlocked). Ensure that update_locked_rq() is only called when rq is
non-NULL, preventing calling __this_cpu_write() on preemptible context.

(As written by CVE List.)

## Affected

- Linux Linux: from 18853ba782bef65fc81ef2b3370382e5b479c5eb before 237c43037b336e36a49eb9f2daac1c7719ec7f8b; from 18853ba782bef65fc81ef2b3370382e5b479c5eb before e14fd98c6d66cb76694b12c05768e4f9e8c95664; 6.15 (not affected: before 6.15; from 6.15.8 up to 6.15.*; from 6.16 up to *)
- linux linux_kernel: from 6.15.1 before 6.15.8; 6.15; 6.16

## References

- <https://git.kernel.org/stable/c/237c43037b336e36a49eb9f2daac1c7719ec7f8b> (patch)
- <https://git.kernel.org/stable/c/e14fd98c6d66cb76694b12c05768e4f9e8c95664> (patch)

## Sources

- CVE List: [CVE-2025-38522](https://www.cve.org/CVERecord?id=CVE-2025-38522), CVE Terms of Use, modified 2026-05-11
- NVD: [CVE-2025-38522](https://nvd.nist.gov/vuln/detail/CVE-2025-38522), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2025-38522 · Whole record: https://cve.day/CVE-2025-38522.json · Rebuilt by cve.day 2026-11-25T22:59:02.624Z
