CVE-2026-93185: ASoC: rt700-sdw: always drain jack work on remove
In the Linux kernel, the following vulnerability has been resolved:
ASoC: rt700-sdw: always drain jack work on remove
rt700sdwremove() drains jackdetectwork and jackbtncheckwork only when rt700->hwinit is true. That state bit is cleared by rt700updatestatus() when the SoundWire slave becomes UNATTACHED, but a jack work item can already have been queued by rt700interruptcallback() or rt700jackinit() while the device was initialized.
Do not use hwinit as the remove-time guard for draining these work objects. The delayed works are initialized during rt700init(), so remove can cancel them unconditionally and pair the object lifetime with the codec-private data lifetime instead of a mutable hardware state bit.
This issue was found by our static analysis tool and then confirmed by manual review of the SoundWire status, interrupt and remove paths. The remove path should drain work based on whether the work object exists, not on a runtime hardware state bit that can change after the work was queued.
A QEMU PoC queued jackdetectwork, simulated SDWSLAVEUNATTACHED, and then entered remove. DEBUGOBJECTS reported an active timer/work object associated with the rt700 jack work path after remove skipped the cancel.
This is sent as an RFC because the practical trigger depends on SoundWire core remove ordering after an UNATTACHED status update. If remove cannot run after hwinit has been cleared while jack work is still pending, this is a defensive lifecycle cleanup rather than a reachable race on current systems.
Affected Software
Event History
Frequently Asked Questions
Which systems are relevant to this issue?
Systems using the Linux kernel rt700-sdw SoundWire codec driver are relevant. The problematic path involves the driver's jack detection and jack button delayed-work objects during device removal.
What sequence leads to the unsafe removal path?
A jack work item must have been queued while the device was initialized, then the SoundWire slave transitions to SDW_SLAVE_UNATTACHED, which clears hw_init, followed by driver removal. In that sequence, removal can skip draining work that was already queued.
How can administrators or developers identify the condition?
The supplied proof of concept caused DEBUG_OBJECTS to report an active timer/work object associated with rt700 jack work during removal. Reviewing traces for queued jack_detect_work or jack_btn_check_work followed by an unattached SoundWire status and remove operation can help identify the affected path.
What is the remediation behavior?
The corrected removal path cancels and drains the delayed jack work unconditionally, because the work objects are initialized during rt700_init(). The provided stable-kernel references contain the resolved changes.