CVE-2026-139047: media: cx231xx-audio: drain wq_trigger before audio fini
In the Linux kernel, the following vulnerability has been resolved:
media: cx231xx-audio: drain wqtrigger before audio fini
audiotrigger() is deferred work (dev->wqtrigger) armed from sndcx231xxcapturetrigger() on every PCM START/STOP; it dereferences dev->adev state and may free the URBs via cx231xxisocaudiodeinit(). cx231xxaudiofini() tore down that state without draining wqtrigger, so work armed before or racing fini ran against freed state.
Use disableworksync() in fini to drain the work and prevent further queueing. Initialize the work, lock and streamstarted counter at the top of cx231xxaudioinit(), before any fallible allocation, and clear the partially-built audio state on its error path, so fini is safe even if a later step fails.
This issue was found by an in-house static analysis tool.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In cx231xx_audio_init(), initialize the work, lock, and stream_started counter at the top of the function, before any fallible allocation, so fini is safe on the error path.
- Compensating control
In cx231xx_audio_fini(), use disable_work_sync() to drain dev->wq_trigger and prevent further queueing before tearing down audio state or freeing URBs.