{"id":"CVE-2025-39935","summary":"ASoC: codec: sma1307: Fix memory corruption in sma1307_setting_loaded()","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nASoC: codec: sma1307: Fix memory corruption in sma1307_setting_loaded()\n\nThe sma1307-\u003eset.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-\u003eset.header, data,\n               sma1307-\u003eset.header_size * sizeof(int));\n\nAlso since we're immediately copying over the memory in -\u003eset.header,\nthere is no need to zero it in the allocator.  Use devm_kmalloc_array()\nto allocate the memory instead.","modified":"2026-04-02T12:48:13.056036Z","published":"2025-10-04T07:30:59.102Z","database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/39xxx/CVE-2025-39935.json","cna_assigner":"Linux"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/78338108b5a856dc98223a335f147846a8a18c51"},{"type":"WEB","url":"https://git.kernel.org/stable/c/cd59ca8f75dbb42a67fcae975c766114644e36c4"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/39xxx/CVE-2025-39935.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-39935"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"576c57e6b4c1d734bcb7cc33dde9a99a9383b520"},{"fixed":"cd59ca8f75dbb42a67fcae975c766114644e36c4"},{"fixed":"78338108b5a856dc98223a335f147846a8a18c51"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-39935.json"}}],"schema_version":"1.7.5"}