DF-3020
devfs_allocv failure ignored: devfs_spec_open and devfs_vop_nlookupdotdot use the vp unconditionally β vn_unlock(NULL)/NULL-fp panic under vnode exhaustion
| Field | Value |
|---|---|
| ID | DF-3020 |
| Status | new |
| Severity | Low |
| CVSS 3.1 | CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H |
| CWE | CWE-476 |
| File | sys/vfs/devfs/devfs_vnops.c |
| Lines | 535-536, 933-978 (contrast :507) |
| Area | vfs/devfs |
| Confidence | speculative |
| Discovered | 2026-09-02 |
| Pass | 2 (GLM 5.3 second pass) |
| Bucket | memcorrupt |
| Reported | pending |
| Known CVE | none |
| CVE match | novel |
Summary
devfs_allocv can return an error leaving vpp=NULL. devfs_vop_nlookupdotdot:535-536 then vn_unlock(a_vpp) on NULL; in devfs_spec_open's clone path the (ignored) failure leaves vp=NULL, ap->a_vp=NULL, and :978 vn_unlock(vp=NULL) β kernel NULL-deref panic. Requires getnewvnode/vget failure β forceable via vnode-cache exhaustion pressure by an unprivileged user, otherwise rare; impact is a panic. Not executed (exhaustion setup time-heavy); code-path direct. Fix: check devfs_allocv's return (bail ENOENT in nlookupdotdot; treat clone allocv failure as failed clone in spec_open).
Timeline
- 2026-09-02 Discovered during pass-2 audit of devfs_vnops.c (GLM 5.3).
No comments yet.