DF-5242
xpt_release_device() uses non-joining callout_stop before kfree(device) β xpt_release_devq_timeout can already be blocked on CAM_SIM_LOCK(device->sim) and then operate on the freed cam_ed (UAF; upstream defers the free)
Summary
On AC_LOST_DEVICE with a pending RELSIM_RELEASE_AFTER_TIMEOUT callout: refcount 1->0 -> callout_stop (no join) -> kfree(device), while the callback may be blocked acquiring the SIM lock held by the releasing context - it then proceeds after the kfree, touching device->sim lock pointer and mutating freed EDT fields. Upstream FreeBSD defers the free via device_destroy_task precisely for this. Race-gated (callout expiry vs last ref drop); source-verified, not reproduced - honest speculative. callout_stop_sync or task-deferred free fix.
Discussion (0)
PoC verification
Evidence pack
findings/poc/DF-5242 Β· 1 files| File | Type | Description | Size | |
|---|---|---|---|---|
| verdict.json | file | 1.0 KB | view raw |
Fix verification
not_testablebaseline noβ patch + rebuild βpatched clean
per-fix-DF-5242
Confirmed kernel references
Detail
Evidence (decisive lines)
static trace in finding markdown (DF-5241 live message in findings/poc/DF-5240/run.log)
Verified recommended fix
see finding markdown
Verdict
untested (Low oracle / Medium race-gated source-verified / Info accounting; Phase V not required per contract - DF-5241 exercised live inside the DF-5240 run)
No comments yet.