CVE-2025-39935

In the Linux kernel, the following vulnerability has been resolved: ASoC: codec: sma1307: Fix memory corruption in sma1307_setting_loaded() The sma1307->set.header_size is how many integers are in the header (there are 8 of them) but instead of allocating space of 8 integers we allocate 8 bytes. This leads to memory corruption when we copy data it on the next line: memcpy(sma1307->set.header, data, sma1307->set.header_size * sizeof(int)); Also since we're immediately copying over the memory in ->set.header, there is no need to zero it in the allocator. Use devm_kmalloc_array() to allocate the memory instead.
Configurations

Configuration 1 (hide)

OR cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.17:rc1:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.17:rc2:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.17:rc3:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.17:rc4:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.17:rc5:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.17:rc6:*:*:*:*:*:*

History

19 Oct 2026, 21:10

Type Values Removed Values Added
Summary
  • (es) En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta: ASoC: codec: sma1307: Corrección de corrupción de memoria en sma1307_setting_loaded() El sma1307->set.header_size es la cantidad de enteros que hay en la cabecera (hay 8 de ellos), pero en lugar de asignar espacio para 8 enteros, asignamos 8 bytes. Esto lleva a corrupción de memoria cuando copiamos datos en la siguiente línea: memcpy(sma1307->set.header, data, sma1307->set.header_size * sizeof(int)); Además, dado que estamos copiando inmediatamente la memoria en ->set.header, no hay necesidad de ponerla a cero en el asignador. Use devm_kmalloc_array() para asignar la memoria en su lugar.

Information

Published : 2025-10-04 08:15

Updated : 2026-10-19 21:10


NVD link : CVE-2025-39935

Mitre link : CVE-2025-39935

CVE.ORG link : CVE-2025-39935


JSON object : View

Products Affected

linux

  • linux_kernel
CWE
CWE-787

Out-of-bounds Write