Not scored
soc: aspeed: lpc-snoop: Fix usercopy overflow in snoop_file_read
- Severity
- Not scored
- Exploit likelihood
- 0.21% (higher than 7% of CVEs)
- Published
- Last changed
- Assigned by
- Linux
Description
In the Linux kernel, the following vulnerability has been resolved: soc: aspeed: lpc-snoop: Fix usercopy overflow in snoop_file_read put_fifo_with_discard() acts as both producer and consumer on the kfifo: it calls kfifo_skip() (advances out) and kfifo_put() (advances in) from the IRQ handler without synchronizing with snoop_file_read(), which also consumes via kfifo_to_user(). On SMP systems this concurrent access can leave (in - out) larger than the ring buffer, so __kfifo_to_user()'s clamp to (in - out) is ineffective and kfifo_copy_to_user() can attempt a copy_to_user() past the kmalloc-2k backing store: usercopy: Kernel memory exposure attempt detected from SLUB object 'kmalloc-2k' (offset 0, size 2049)! kernel BUG at mm/usercopy.c! Call trace: usercopy_abort __check_heap_object __check_object_size kfifo_copy_to_user __kfifo_to_user snoop_file_read vfs_read Serialize kfifo access with a per-channel spinlock shared between the IRQ handler (producer) and the file reader (consumer). Annotate @fifo with __guarded_by(&lock) and opt the driver into context analysis so the compiler enforces that all fifo access holds the lock.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Linux Linux | from 3772e5da445420543b25825ac2b5971f3743f6e8 before f62afe827c52c300c64715631e6ac9e576c5112d, from 3772e5da445420543b25825ac2b5971f3743f6e8 before b87c0d24386ed5106feac12034fe09d893ccb469, from 3772e5da445420543b25825ac2b5971f3743f6e8 before afe2527eae0b51d5e8ddd77293afab3a5a1311a4, from 3772e5da445420543b25825ac2b5971f3743f6e8 before 868c478abce858135db3eb65548a577e4b6747ac, from 3772e5da445420543b25825ac2b5971f3743f6e8 before 131ab677b03349a5ae48da8722ec7075b37ec66e, from 3772e5da445420543b25825ac2b5971f3743f6e8 before 1acef6d85bfd98bd9dfe1f08bffa397a4dda8a6f, 4.19 Not affected: before 4.19, from 6.1.191 up to 6.1.*, from 6.6.160 up to 6.6.*, from 6.12.114 up to 6.12.*, from 6.18.57 up to 6.18.*, from 7.1.9 up to 7.1.* | CVE List |
What each source says
CVE List
In the Linux kernel, the following vulnerability has been resolved: soc: aspeed: lpc-snoop: Fix usercopy overflow in snoop_file_read put_fifo_with_discard() acts as both producer and consumer on the kfifo: it calls kfifo_skip() (advances out) and kfifo_put() (advances in) from the IRQ handler without synchronizing with snoop_file_read(), which also consumes via kfifo_to_user(). On SMP systems this concurrent access can leave (in - out) larger than the ring buffer, so __kfifo_to_user()'s clamp to (in - out) is ineffective and kfifo_copy_to_user() can attempt a copy_to_user() past the kmalloc-2k backing store: usercopy: Kernel memory exposure attempt detected from SLUB object 'kmalloc-2k' (offset 0, size 2049)! kernel BUG at mm/usercopy.c! Call trace: usercopy_abort __check_heap_object __check_object_size kfifo_copy_to_user __kfifo_to_user snoop_file_read vfs_read Serialize kfifo access with a per-channel spinlock shared between the IRQ handler (producer) and the file reader (consumer). Annotate @fifo with __guarded_by(&lock) and opt the driver into context analysis so the compiler enforces that all fifo access holds the lock.
NVD (es)
En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta: soc: aspeed: lpc-snoop: Corrección de desbordamiento de usercopy en snoop_file_read put_fifo_with_discard() actúa como productor y consumidor en el kfifo: llama a kfifo_skip() (avanza hacia afuera) y kfifo_put() (avanza hacia adentro) desde el gestor IRQ sin sincronizarse con snoop_file_read(), que también consume a través de kfifo_to_user(). En sistemas SMP, este acceso concurrente puede dejar (in - out) mayor que el búfer de anillo, por lo que la limitación de __kfifo_to_user() a (in - out) es ineficaz y kfifo_copy_to_user() puede intentar un copy_to_user() más allá del almacenamiento de respaldo kmalloc-2k: usercopy: Intento de exposición de memoria del kernel detectado desde el objeto SLUB 'kmalloc-2k' (desplazamiento 0, tamaño 2049)! BUG del kernel en mm/usercopy.c! Traza de llamada: usercopy_abort __check_heap_object __check_object_size kfifo_copy_to_user __kfifo_to_user snoop_file_read vfs_read Serializar el acceso al kfifo con un spinlock por canal compartido entre el gestor IRQ (productor) y el lector de archivos (consumidor). Anotar @fifo con __guarded_by(&lock) y optar por incluir el controlador en el análisis de contexto para que el compilador imponga que todo acceso al fifo mantenga el bloqueo.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-74729 changed 2026-10-30 | CVE Terms of Use |
| NVD | CVE-2026-74729 changed 2026-10-30 | Public domain |