AZL-116836: CVE-2026-139047 affecting package kernel 6.6.161.1-1
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 before any fallible allocation, and clear partially built audio state 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.
Event History
Frequently Asked Questions
What runtime condition can lead to use of freed audio state?
The condition involves deferred audio trigger work that was armed by PCM START or STOP operations and then runs while audio teardown is occurring. The work can dereference audio-device state or free URBs after that state has been torn down.
What does the fix change to prevent the race?
The fix drains and disables the deferred trigger work during audio finalization, preventing queued work from running against freed state and preventing further queueing. It also initializes relevant work, locking, and stream state before fallible allocations and clears partially built audio state on initialization errors.