DF-2794
sys_lwp_rtprio() with tid == -1 ignores the target pid and always operates on the caller's own lwp
| Field | Value |
|---|---|
| ID | DF-2794 |
| Status | new |
| Severity | Info |
| CVSS 3.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:N |
| CWE | CWE-670 Inconsistent Implementation |
| File | sys/kern/kern_resource.c |
| Lines | 588-593 |
| Area | kern |
| Confidence | certain |
| Discovered | 2026-08-31 |
| Pass | 2 (GLM 5.3 second pass) |
| Bucket | base:kern |
| Reported | pending |
| Known CVE | none |
| CVE match | novel |
Summary
tid == -1 ("sadly, tid can be 0 so we can't use 0 here") resolves lp =
curthread->td_lwp regardless of uap->pid. RTP_SET/RTP_LOOKUP with
pid=
Recommended fix
When pid != 0 and tid == -1, resolve lp from the target (FIRST_LWP_IN_PROC(p) with the DF-2791 NULL check), or reject the combination with EINVAL.
Timeline
- 2026-08-31 Discovered during pass-2 audit of kern_resource.c (GLM 5.3).
No comments yet.