unregister_int dereferences the caller-supplied (possibly stale/freed) cookie before and after validation β freed-heap read and arbitrary-pointer %s print
| Field | Value |
|---|---|
| ID | DF-2776 |
| Status | new |
| Severity | Low |
| CVSS 3.1 | CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:L/I:N/A:H |
| CWE | CWE-476 / CWE-416 |
| File | sys/kern/kern_intr.c |
| Lines | 425, 489-490 (nexus.c:538-545 no teardown guard) |
| Area | kern |
| Confidence | likely |
| Discovered | 2026-08-31 |
| Pass | 2 (GLM 5.3 second pass) |
| Bucket | kernleak |
| Reported | pending |
| Known CVE | none |
| CVE match | novel |
Summary
unregister_int() reads intr = ((intrec_t)id)->intr before any
validation of id, and when the record is not found it prints
((intrec_t)id)->name as %s β both dereference the cookie after it may
already have been freed by a previous teardown. nexus_teardown_intr
passes the cookie straight through with no double-teardown guard and
never clears it, so any driver calling bus_teardown_intr twice with a
stale cookie (a classic driver error-path bug) makes the kernel read
freed heap and print a string through whatever pointer now occupies
rec->name β arbitrary-address string read to console/log β or panic.
Threat model & preconditions
Requires a buggy driver performing double teardown (root-triggered detach or shutdown error paths); the kernel turns the driver bug into an arbitrary-pointer string print instead of ignoring the stale cookie.
Recommended fix
Treat a not-found id as a benign no-op without dereferencing it (print the pointer, not the name): see row diff.
Timeline
- 2026-08-31 Discovered during pass-2 audit of kern_intr.c (GLM 5.3).
No comments yet.