DF-4136 / verdict.json
{ "finding_id": "DF-4136", "status": "reproduced", "reproduced": 1, "impact": "dos", "confidence": "certain", "verdict": "VINUM_MOVE reaches give_sd_to_drive() without lock_config(); when the move target drive has insufficient space the No space error path calls throw_rude_remark(), whose bug-catcher panics because VF_LOCKED is not held. One ioctl from root panics the machine with the exact predicted backtrace: throw_rude_remark <- give_sd_to_drive <- moveobject <- vinumioctl <- dev_dioctl. Verified on the kernel rebuilt with the DF-4132/DF-4133 fixes (independent defect). Any routine, recoverable config error on the MOVE/ATTACH/DETACH/SETSTATE ioctl paths is a kernel panic instead of an error return.", "exploit_chain": "craft two vinum drives (x0 with sd s0 1MB; x1 up with a 1500kB filler so free space < 1MB) -> VINUM_MOVE {_IOC style _IOWR(F,98,struct _ioctl_reply)} with {index=driveno(x1), otherobject=sdno(s0), type=sd_object} -> moveobject -> give_sd_to_drive -> freelist search fails -> throw_rude_remark(ENOSPC,...) -> panic(throw_rude_remark: called without config lock) at vinumconfig.c:105.", "evidence": "panic.txt (panic message + full backtrace), serial_full.txt, vinum_movepanic.c, README.md", "kernel_refs": [ "sys/dev/raid/vinum/vinumconfig.c:105", "sys/dev/raid/vinum/vinumconfig.c:318", "sys/dev/raid/vinum/vinumconfig.c:324", "sys/dev/raid/vinum/vinumioctl.c:317", "sys/dev/raid/vinum/vinumioctl.c:847", "sys/dev/raid/vinum/vinumlock.c:227" ], "poc_changes": "Went through several trigger variants: the hotspare config keyword is dead (kw_hotspare exists but the string was never added to the keyword table), so the No space route was used; config text had to use the kernels space-separated grammar (name=x forms are userland-only).", "attempts": 6, "guest_uname": "DragonFly dfbsd 6.5-DEVELOPMENT DragonFly 6.5-DEVELOPMENT #1: Fri Sep 18 04:22:5x UTC 2026 root@dfbsd:/usr/obj/usr/src/sys/X86_64_GENERIC x86_64 (kernel carrying the DF-4132/DF-4133 fixes)", "runtime_sec": 1500, "guest_dirty": 0, "build_cmd": "cc -O -o vinum_movepanic vinum_movepanic.c", "run_cmd": "./vinum_movepanic <full-drive-index> <sd-index>", "code_hash": "7ce211165b64f434013b6d05812ace095ea0c72416868ac5d98e85cfe53bf2e0", "notes": "Root-gated (control device is 0600 root:wheel), hence dos/low severity; the same panic is reachable via VINUM_ATTACH to a full plex and other throw paths that run without the config lock.", "recommended_fix": "Take lock_config()/unlock_config() around the ioctls that can throw (VINUM_MOVE/ATTACH/DETACH/SETSTATE), or make the bug-catcher non-fatal.", "fix_status": "not_tested", "fix_baseline_reproduced": 1, "fix_patched_reproduced": 0, "fix_verdict": "No fix built for this finding in this run (the validated fix kernel addressed DF-4132/4133); the panic was reproduced on that build. Proposed lock_config wrapper in README is untested.", "fix_evidence": "panic.txt baseline." } |