"value":"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."
"value":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: ALSA: sh: aica: reordenar operaciones de limpieza para evitar errores UAF. El dreamcastcard->timer podr\u00eda programar el spu_dma_work y el spu_dma_work tambi\u00e9n podr\u00eda armar el dreamcastcard->timer. Cuando se cierre snd_pcm_substream, se desasignar\u00e1 aica_channel. Pero a\u00fan se podr\u00eda eliminar la referencia en el hilo del trabajador. La raz\u00f3n es que del_timer() regresar\u00e1 directamente independientemente de si el controlador del temporizador se est\u00e1 ejecutando o no y el trabajador podr\u00eda reprogramarse en el controlador del temporizador. Como resultado, se producir\u00e1 el error UAF. La situaci\u00f3n picante se muestra a continuaci\u00f3n: (Thread 1) | (Thread 2) snd_aicapcm_pcm_close() | ... | run_spu_dma() //worker | mod_timer() flush_work() | del_timer() | aica_period_elapsed() //timer kfree(dreamcastcard->channel) | schedule_work() | run_spu_dma() //worker ... | dreamcastcard->channel-> //USE Para mitigar este error y otros posibles casos extremos, llame a mod_timer() condicionalmente en run_spu_dma(), luego implemente la operaci\u00f3n PCM sync_stop para cancelar tanto el temporizador como el trabajador. La operaci\u00f3n sync_stop se llamar\u00e1 desde el n\u00facleo PCM de forma adecuada cuando sea necesario."