{"id":"CVE-2024-26654","aliases":["CVE-2024-26654"],"related":[],"kind":"vulnerability","state":"published","title":"ALSA: sh: aica: reorder cleanup operations to avoid UAF bugs","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nALSA: sh: aica: reorder cleanup operations to avoid UAF bugs\n\nThe dreamcastcard->timer could schedule the spu_dma_work and the\nspu_dma_work could also arm the dreamcastcard->timer.\n\nWhen the snd_pcm_substream is closing, the aica_channel will be\ndeallocated. But it could still be dereferenced in the worker\nthread. The reason is that del_timer() will return directly\nregardless of whether the timer handler is running or not and\nthe worker could be rescheduled in the timer handler. As a result,\nthe UAF bug will happen. The racy situation is shown below:\n\n      (Thread 1)                 |      (Thread 2)\nsnd_aicapcm_pcm_close()          |\n ...                             |  run_spu_dma() //worker\n                                 |    mod_timer()\n  flush_work()                   |\n  del_timer()                    |  aica_period_elapsed() //timer\n  kfree(dreamcastcard->channel)  |    schedule_work()\n                                 |  run_spu_dma() //worker\n  ...                            |    dreamcastcard->channel-> //USE\n\nIn order to mitigate this bug and other possible corner cases,\ncall mod_timer() conditionally in run_spu_dma(), then implement\nPCM sync_stop op to cancel both the timer and worker. The sync_stop\nop will be called from PCM core appropriately when needed.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nALSA: sh: aica: reorder cleanup operations to avoid UAF bugs\n\nThe dreamcastcard->timer could schedule the spu_dma_work and the\nspu_dma_work could also arm the dreamcastcard->timer.\n\nWhen the snd_pcm_substream is closing, the aica_channel will be\ndeallocated. But it could still be dereferenced in the worker\nthread. The reason is that del_timer() will return directly\nregardless of whether the timer handler is running or not and\nthe worker could be rescheduled in the timer handler. As a result,\nthe UAF bug will happen. The racy situation is shown below:\n\n      (Thread 1)                 |      (Thread 2)\nsnd_aicapcm_pcm_close()          |\n ...                             |  run_spu_dma() //worker\n                                 |    mod_timer()\n  flush_work()                   |\n  del_timer()                    |  aica_period_elapsed() //timer\n  kfree(dreamcastcard->channel)  |    schedule_work()\n                                 |  run_spu_dma() //worker\n  ...                            |    dreamcastcard->channel-> //USE\n\nIn order to mitigate this bug and other possible corner cases,\ncall mod_timer() conditionally in run_spu_dma(), then implement\nPCM sync_stop op to cancel both the timer and worker. The sync_stop\nop will be called from PCM core appropriately when needed.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: ALSA: sh: aica: reordenar operaciones de limpieza para evitar errores UAF. El dreamcastcard-&gt;timer podría programar el spu_dma_work y el spu_dma_work también podría armar el dreamcastcard-&gt;timer. Cuando se cierre snd_pcm_substream, se desasignará aica_channel. Pero aún se podría eliminar la referencia en el hilo del trabajador. La razón es que del_timer() regresará directamente independientemente de si el controlador del temporizador se está ejecutando o no y el trabajador podría reprogramarse en el controlador del temporizador. Como resultado, se producirá el error UAF. La situación picante se muestra a continuación: (Thread 1) | (Thread 2) snd_aicapcm_pcm_close() | ... | run_spu_dma() //worker | mod_timer() flush_work() | del_timer() | aica_period_elapsed() //timer kfree(dreamcastcard-&gt;channel) | schedule_work() | run_spu_dma() //worker ... | dreamcastcard-&gt;channel-&gt; //USE Para mitigar este error y otros posibles casos extremos, llame a mod_timer() condicionalmente en run_spu_dma(), luego implemente la operación PCM sync_stop para cancelar tanto el temporizador como el trabajador. La operación sync_stop se llamará desde el núcleo PCM de forma adecuada cuando sea necesario.","source":"nvd"}],"published":"2024-04-01T08:35:19.763Z","modified":"2026-08-05T11:26:33.368Z","severity":{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},"severities":[{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7,"rating":"HIGH"}],"cwes":["CWE-416"],"affected":[{"ranges":[{"type":"git","introduced":"198de43d758ca2700e2b52b49c0b189b4931466c","fixed":"eeb2a2ca0b8de7e1c66afaf719529154e7dc60b2","status":"affected"},{"type":"git","introduced":"198de43d758ca2700e2b52b49c0b189b4931466c","fixed":"4206ad65a0ee76920041a755bd3c17c6ba59bba2","status":"affected"},{"type":"git","introduced":"198de43d758ca2700e2b52b49c0b189b4931466c","fixed":"aa39e6878f61f50892ee2dd9d2176f72020be845","status":"affected"},{"type":"git","introduced":"198de43d758ca2700e2b52b49c0b189b4931466c","fixed":"8c990221681688da34295d6d76cc2f5b963e83f5","status":"affected"},{"type":"git","introduced":"198de43d758ca2700e2b52b49c0b189b4931466c","fixed":"9d66ae0e7bb78b54e1e0525456c6b54e1d132046","status":"affected"},{"type":"git","introduced":"198de43d758ca2700e2b52b49c0b189b4931466c","fixed":"61d4787692c1fccdc268ffa7a891f9c149f50901","status":"affected"},{"type":"git","introduced":"198de43d758ca2700e2b52b49c0b189b4931466c","fixed":"e955e8a7f38a856fc6534ba4e6bffd4d5cc80ac3","status":"affected"},{"type":"git","introduced":"198de43d758ca2700e2b52b49c0b189b4931466c","fixed":"3c907bf56905de7d27b329afaf59c2fb35d17b04","status":"affected"},{"type":"git","introduced":"198de43d758ca2700e2b52b49c0b189b4931466c","fixed":"051e0840ffa8ab25554d6b14b62c9ab9e4901457","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"2.6.23","status":"affected"},{"type":"semver","introduced":"0","fixed":"2.6.23","status":"unaffected"},{"type":"semver","introduced":"4.19.312","lastAffected":"4.19.*","status":"unaffected"},{"type":"semver","introduced":"5.4.274","lastAffected":"5.4.*","status":"unaffected"},{"type":"semver","introduced":"5.10.215","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.154","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.84","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.24","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.7.12","lastAffected":"6.7.*","status":"unaffected"},{"type":"semver","introduced":"6.8.3","lastAffected":"6.8.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.9","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"2.6.23","fixed":"4.19.312"},{"status":"affected","introduced":"4.20","fixed":"5.4.274"},{"status":"affected","introduced":"5.5","fixed":"5.10.215"},{"status":"affected","introduced":"5.11","fixed":"5.15.154"},{"status":"affected","introduced":"5.16","fixed":"6.1.84"},{"status":"affected","introduced":"6.2","fixed":"6.6.24"},{"status":"affected","introduced":"6.7","fixed":"6.7.12"},{"status":"affected","introduced":"6.8","fixed":"6.8.3"},{"status":"affected","version":"6.9"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"10.0"}],"vendor":"debian","product":"debian_linux","cpe":"cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/eeb2a2ca0b8de7e1c66afaf719529154e7dc60b2","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/4206ad65a0ee76920041a755bd3c17c6ba59bba2","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/aa39e6878f61f50892ee2dd9d2176f72020be845","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/8c990221681688da34295d6d76cc2f5b963e83f5","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/9d66ae0e7bb78b54e1e0525456c6b54e1d132046","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/61d4787692c1fccdc268ffa7a891f9c149f50901","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/e955e8a7f38a856fc6534ba4e6bffd4d5cc80ac3","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/3c907bf56905de7d27b329afaf59c2fb35d17b04","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/051e0840ffa8ab25554d6b14b62c9ab9e4901457","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2024/06/msg00017.html","tags":["mailing-list","x-transferred"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2024-09-10T15:53:59.432Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-26654","url":"https://www.cve.org/CVERecord?id=CVE-2024-26654","licence":"CVE Terms of Use","modified":"2026-08-05T11:26:33.368Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-26654","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-26654","licence":"Public domain","modified":"2026-08-04T11:16:53.580Z"}],"updatedAt":"2026-11-25T22:58:38.259Z","epss":{"score":0.0026,"percentile":0.18856,"date":"2026-12-01T12:00:22.000Z"}}