Duplicate-swap-device check compares vnodes, not devices β the same cdev swapped on twice via distinct devfs alias vnodes interleaves two swap stripes over the same physical blocks
| Field | Value |
|---|---|
| ID | DF-2881 |
| Status | new |
| Severity | Low |
| CVSS 3.1 | CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:L/I:L/A:N |
| CWE | CWE-1023 Incomplete Comparison |
| File | sys/vm/vm_swap.c |
| Lines | 281, 426 |
| Area | vm |
| Confidence | likely |
| Discovered | 2026-09-02 |
| Pass | 2 (GLM 5.3 second pass) |
| Bucket | base:vm |
| Reported | pending |
| Known CVE | none |
| CVE match | novel |
Summary
sys_swapon's duplicate detection is sp->sw_vp == vp and sys_swapoff
matches the same way. DFly devfs allocates one vnode per devfs node,
and the disk layer explicitly creates alias nodes for the same cdev
(serno/%s make_dev_alias, slice aliases). Swapping on /dev/da0s1b and
/dev/serno/
Timeline
- 2026-09-02 Discovered during pass-2 audit of vm_swap.c (GLM 5.3).
No comments yet.