{"id":"CVE-2025-39935","aliases":["CVE-2025-39935"],"related":[],"kind":"vulnerability","state":"published","title":"ASoC: codec: sma1307: Fix memory corruption in sma1307_setting_loaded()","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nASoC: codec: sma1307: Fix memory corruption in sma1307_setting_loaded()\n\nThe sma1307->set.header_size is how many integers are in the header\n(there are 8 of them) but instead of allocating space of 8 integers\nwe allocate 8 bytes.  This leads to memory corruption when we copy data\nit on the next line:\n\n        memcpy(sma1307->set.header, data,\n               sma1307->set.header_size * sizeof(int));\n\nAlso since we're immediately copying over the memory in ->set.header,\nthere is no need to zero it in the allocator.  Use devm_kmalloc_array()\nto allocate the memory instead.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nASoC: codec: sma1307: Fix memory corruption in sma1307_setting_loaded()\n\nThe sma1307->set.header_size is how many integers are in the header\n(there are 8 of them) but instead of allocating space of 8 integers\nwe allocate 8 bytes.  This leads to memory corruption when we copy data\nit on the next line:\n\n        memcpy(sma1307->set.header, data,\n               sma1307->set.header_size * sizeof(int));\n\nAlso since we're immediately copying over the memory in ->set.header,\nthere is no need to zero it in the allocator.  Use devm_kmalloc_array()\nto allocate the memory instead.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\nASoC: codec: sma1307: Corrección de corrupción de memoria en sma1307_setting_loaded()\n\nEl 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:\n\n        memcpy(sma1307->set.header, data,\n               sma1307->set.header_size * sizeof(int));\n\nAdemá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.","source":"nvd"}],"published":"2025-10-04T07:30:59.102Z","modified":"2026-10-19T21:10:00.160Z","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:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"}],"cwes":["CWE-787"],"affected":[{"ranges":[{"type":"git","introduced":"576c57e6b4c1d734bcb7cc33dde9a99a9383b520","fixed":"cd59ca8f75dbb42a67fcae975c766114644e36c4","status":"affected"},{"type":"git","introduced":"576c57e6b4c1d734bcb7cc33dde9a99a9383b520","fixed":"78338108b5a856dc98223a335f147846a8a18c51","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"6.13","status":"affected"},{"type":"semver","introduced":"0","fixed":"6.13","status":"unaffected"},{"type":"semver","introduced":"6.16.9","lastAffected":"6.16.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.17","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":"6.13","fixed":"6.16.9"},{"status":"affected","version":"6.17"},{"status":"affected","version":"6.17"},{"status":"affected","version":"6.17"},{"status":"affected","version":"6.17"},{"status":"affected","version":"6.17"},{"status":"affected","version":"6.17"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/cd59ca8f75dbb42a67fcae975c766114644e36c4","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/78338108b5a856dc98223a335f147846a8a18c51","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-39935","url":"https://www.cve.org/CVERecord?id=CVE-2025-39935","licence":"CVE Terms of Use","modified":"2026-08-05T12:06:13.802Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-39935","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-39935","licence":"Public domain","modified":"2026-10-19T21:10:00.160Z"}],"updatedAt":"2026-11-25T22:59:05.517Z","epss":{"score":0.00147,"percentile":0.04149,"date":"2026-12-01T12:00:22.000Z"}}