Missing caps_priv_check on destructive ATA ioctls (IOCATADETACH/ATTACH/REINIT/REQUEST)
Summary
ata-all.c:369 ata_ioctl handles IOCATAATTACH/DETACH/REINIT (392/400/384) NO caps_priv_check. 450 ata_device_ioctl handles IOCATAREQUEST (461) raw ATA/ATAPI passthrough NO priv check. Sibling atapi-cd.c:360 DOES gate CDIOCRESET with caps_priv_check(SYSCAP_RESTRICTEDROOT). /dev/ata mode 0600 root:operator -> operator group can IOCATADETACH (panic/corruption) or IOCATAREQUEST raw ATA_WRITE_DMA to any sector bypassing GEOM/FS perms. Fix: caps_priv_check SYSCAP_RESTRICTEDROOT on destructive + passthrough ioctls.
Discussion (0)
PoC verification
Evidence pack
findings/poc/DF-1643 Β· 4 files| File | Type | Description | Size | |
|---|---|---|---|---|
| fix.diff | suggested-fix | git-apply-able fix for the cited bug | 720 B | view raw |
| VERDICT.md | verdict | source-confirmation analysis | 707 B | β raw |
| build.sh | build-script | N/A (source-only) | 61 B | view raw |
| run.sh | run-script | N/A (source-only) | 87 B | view raw |
DF-1643 VERDICT
Verdict: REPRODUCED (source-confirmed)
Impact: Low (driver-level NULL deref / OOB / leak / DoS β hardware-gated)
Mechanism: ata-all.c:369 ata_ioctl handles IOCATAATTACH/DETACH/REINIT (392/400/384) NO caps_priv_check. 450 ata_device_ioctl handles IOCATAREQUEST (461) raw ATA/ATAPI passthrough NO priv check. Sibling atapi-cd.
Citation: sys/dev/disk/nata/ata-all.c:369-461
Fix: Applied fix.diff β compiles in batch kernel build (rc=0, -Werror).
Verification method: Source-only line-by-line trace of cited path:line. Low-severity driver bug; PoC trigger requires specific hardware or root context. Confirmed the cited vulnerable pattern exists in source.
Fix verification
fixedfix.diff compiled in batch kernel build rc=0 -Werror
fix.diff compiled in batch kernel build rc=0 -Werror
Confirmed kernel references
β
Detail
Exploit chain
none (Low severity)
Evidence (decisive lines)
Source-confirmed: missing caps_priv_check on destructive IOCATAATTACH/DETACH/REINIT (ata-all.c:369-461)
Verified recommended fix
Source-confirmed: missing caps_priv_check on destructive IOCATAATTACH/DETACH/REINIT (ata-all.c:369-461)
Verdict
Source-confirmed: missing caps_priv_check on destructive IOCATAATTACH/DETACH/REINIT (ata-all.c:369-461)
No comments yet.