freerd_state allocation prologue runs unlocked and is reachable from two threads concurrently β orphaned kdmsg_state leak
Summary
The freerd_state prologue reads/kmallocs/assigns iocom->freerd_state BEFORE acquiring msglk, justified by a comment claiming no races β false: kdmsg_state_abort releases msglk and calls kdmsg_state_msgrx from the WRITER thread (deferred aborts in cleanuptx and drain paths), so both threads can execute the unlocked prologue simultaneously. Interleaving read-NULL/alloc/write loses one update and permanently orphans a fully-initialized state (refs=1, no pointer) β a 160-byte leak the peer can provoke by racing teardown traffic against new commands. No corruption possible (the under-lock handoff is serialized β a state can only be leaked, never double-used). Move-population-under-msglk fix proposed. Code-path proof only (Low).
Discussion (0)
PoC verification
Evidence pack
findings/poc/DF-5827 Β· 1 files| File | Type | Description | Size | |
|---|---|---|---|---|
| verdict.json | file | 1.0 KB | view raw |
Fix verification
not_testableConfirmed kernel references
Detail
Evidence (decisive lines)
static trace; cross-refs in DF-5825 evidence pack
Verified recommended fix
populate freerd_state under msglk
Verdict
untested (Info/Low hardening or race-bound leak - Phase V not applicable or not economical per contract; DF-5825 pack carries the transport proof)
No comments yet.