CVE-2024-26654

Source
https://cve.org/CVERecord?id=CVE-2024-26654
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-26654.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2024-26654
Downstream
Related
Published
2024-04-01T08:35:19.763Z
Modified
2026-03-14T12:29:54.125227Z
Summary
ALSA: sh: aica: reorder cleanup operations to avoid UAF bugs
Details

In the Linux kernel, the following vulnerability has been resolved:

ALSA: sh: aica: reorder cleanup operations to avoid UAF bugs

The dreamcastcard->timer could schedule the spudmawork and the spudmawork could also arm the dreamcastcard->timer.

When the sndpcmsubstream is closing, the aicachannel will be deallocated. But it could still be dereferenced in the worker thread. The reason is that deltimer() will return directly regardless of whether the timer handler is running or not and the worker could be rescheduled in the timer handler. As a result, the UAF bug will happen. The racy situation is shown below:

  (Thread 1)                 |      (Thread 2)

sndaicapcmpcmclose() | ... | runspudma() //worker | modtimer() flushwork() | deltimer() | aicaperiodelapsed() //timer kfree(dreamcastcard->channel) | schedulework() | runspu_dma() //worker ... | dreamcastcard->channel-> //USE

In order to mitigate this bug and other possible corner cases, call modtimer() conditionally in runspudma(), then implement PCM syncstop op to cancel both the timer and worker. The sync_stop op will be called from PCM core appropriately when needed.

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/26xxx/CVE-2024-26654.json",
    "cna_assigner": "Linux"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
198de43d758ca2700e2b52b49c0b189b4931466c
Fixed
eeb2a2ca0b8de7e1c66afaf719529154e7dc60b2
Fixed
4206ad65a0ee76920041a755bd3c17c6ba59bba2
Fixed
aa39e6878f61f50892ee2dd9d2176f72020be845
Fixed
8c990221681688da34295d6d76cc2f5b963e83f5
Fixed
9d66ae0e7bb78b54e1e0525456c6b54e1d132046
Fixed
61d4787692c1fccdc268ffa7a891f9c149f50901
Fixed
e955e8a7f38a856fc6534ba4e6bffd4d5cc80ac3
Fixed
3c907bf56905de7d27b329afaf59c2fb35d17b04
Fixed
051e0840ffa8ab25554d6b14b62c9ab9e4901457

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-26654.json"