procfs_rwmem ignores kmem_alloc_pageable failure β kva=0 reaches pmap_kenter_quick(0,pa), overwriting pml4[0] of the current user pmap (page-table pivot) plus uiomove on VA 0
| Field | Value |
|---|---|
| ID | DF-2900 |
| Status | new |
| Severity | Low |
| CVSS 3.1 | CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H |
| CWE | CWE-252 / CWE-476 |
| File | sys/vfs/procfs/procfs_mem.c |
| Lines | 101, 147-148, 161 (contract: vm_kern.c:163-179) |
| Area | vfs/procfs |
| Confidence | likely |
| Discovered | 2026-09-02 |
| Pass | 2 (GLM 5.3 second pass β vm_kern.c row) |
| Bucket | privesc |
| Reported | pending |
| Known CVE | none |
| CVE match | novel |
Summary
kmem_alloc_pageable() documents returning 0 on failure (vm_map_find
error β return 0, vm_kern.c:176-178). procfs_rwmem() stores the result
in kva without any check (procfs_mem.c:101). Every unprivileged user
reaches this via pread/pwrite on /proc/
Recommended fix
if (kva == 0) { vmspace_drop(vm); return (ENOMEM); } after :101.
Timeline
- 2026-09-02 Discovered during pass-2 audit of vm_kern.c (GLM 5.3); caller-discipline defect, consequence verified by code trace.
No comments yet.