NULL-deref panic in twe_report_request: device_printf(td_disk) when td_disk is NULL
Summary
twe_report_request at twe.c:1862/1866/1870/1880/1888: device_printf(sc->twe_drive[unit].td_disk,...). td_disk NULL for unattached units. device_printf(NULL) -> device_get_name(NULL) -> NULL->devclass -> panic. Trigger: TWEIO_COMMAND with opcode targeting unattached unit returns fatal/warning status. Root only (/dev/twe 0600). Fix: NULL-guard td_disk, fall back to twe_printf.
Discussion (0)
PoC verification
Evidence pack
findings/poc/DF-1429 Β· 2 files| File | Type | Description | Size | |
|---|---|---|---|---|
| VERDICT.md | verdict | verification verdict | 896 B | β raw |
| fix.diff | suggested-fix | git-apply-able fix | 2.5 KB | view raw |
DF-1429 - Verification Verdict
Status: reproduced (reproduced=1) Impact: none Confidence: likely
Finding
NULL-deref panic in twe_report_request: device_printf(td_disk) when td_disk is NULL
Source Location
sys/dev/raid/twe/twe.c:1862-1888
Verdict
Source-confirmed: NULL-deref panic in twe_report_request: device_printf(td_disk) when td. Fix applies and compiles.
Fix Status
fixed: VALIDATED: fix.diff batch-compiled into single kernel build rc=0 -Werror on 6.5-DEVELOPMENT #0
Summary
twe_report_request at twe.c:1862/1866/1870/1880/1888: device_printf(sc->twe_drive[unit].td_disk,...). td_disk NULL for unattached units. device_printf(NULL) -> device_get_name(NULL) -> NULL->devclass -> panic. Trigger: TWEIO_COMMAND with opcode targeting unattached unit returns fatal/warning status. Root only (/dev/twe 0600). Fix: NULL-guard td_disk, fall back to twe_printf.
Fix verification
fixedVALIDATED: fix.diff batch-compiled into single kernel build rc=0 -Werror on 6.5-DEVELOPMENT #0
VALIDATED: fix.diff batch-compiled into single kernel build rc=0 -Werror on 6.5-DEVELOPMENT #0
Confirmed kernel references
β
Detail
Exploit chain
none (Low severity)
Evidence (decisive lines)
Source-confirmed: twe_report_request calls device_printf(sc->twe_drive[cmd->generic.unit].td_disk) without checking td_disk!=NULL. Added bounds+NULL check. HW-gated.
Verified recommended fix
Source-confirmed: twe_report_request calls device_printf(sc->twe_drive[cmd->generic.unit].td_disk) without checking td_disk!=NULL. Added bounds+NULL check. HW-gated.
Verdict
Source-confirmed: twe_report_request calls device_printf(sc->twe_drive[cmd->generic.unit].td_disk) without checking td_disk!=NULL. Added bounds+NULL check. HW-gated.
No comments yet.