{"id":"CVE-2026-31475","aliases":["CVE-2026-31475"],"related":[],"kind":"vulnerability","state":"published","title":"ASoC: sma1307: fix double free of devm_kzalloc() memory","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nASoC: sma1307: fix double free of devm_kzalloc() memory\n\nA previous change added NULL checks and cleanup for allocation\nfailures in sma1307_setting_loaded().\n\nHowever, the cleanup for mode_set entries is wrong. Those entries are\nallocated with devm_kzalloc(), so they are device-managed resources and\nmust not be freed with kfree(). Manually freeing them in the error path\ncan lead to a double free when devres later releases the same memory.\n\nDrop the manual kfree() loop and let devres handle the cleanup.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nASoC: sma1307: fix double free of devm_kzalloc() memory\n\nA previous change added NULL checks and cleanup for allocation\nfailures in sma1307_setting_loaded().\n\nHowever, the cleanup for mode_set entries is wrong. Those entries are\nallocated with devm_kzalloc(), so they are device-managed resources and\nmust not be freed with kfree(). Manually freeing them in the error path\ncan lead to a double free when devres later releases the same memory.\n\nDrop the manual kfree() loop and let devres handle the cleanup.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\nASoC: sma1307: corrige doble liberación de memoria devm_kzalloc()\n\nUn cambio anterior añadió comprobaciones de NULL y limpieza para fallos de asignación en sma1307_setting_loaded().\n\nSin embargo, la limpieza para las entradas mode_set es incorrecta. Esas entradas se asignan con devm_kzalloc(), por lo que son recursos gestionados por el dispositivo y no deben liberarse con kfree(). Liberarlas manualmente en la ruta de error puede llevar a una doble liberación cuando devres libere posteriormente la misma memoria.\n\nEliminar el bucle kfree() manual y dejar que devres gestione la limpieza.","source":"nvd"}],"published":"2026-04-22T13:54:04.113Z","modified":"2026-11-11T23:10:00.263Z","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"}],"cwes":["CWE-415"],"affected":[{"ranges":[{"type":"git","introduced":"0ec6bd16705fe21d6429d6b8f7981eae2142bba8","fixed":"d472d1a52985211b92883bb64bbe710b45980190","status":"affected"},{"type":"git","introduced":"0ec6bd16705fe21d6429d6b8f7981eae2142bba8","fixed":"1a82c3272626db9006f4c2cad3adf2916417aed6","status":"affected"},{"type":"git","introduced":"0ec6bd16705fe21d6429d6b8f7981eae2142bba8","fixed":"fe757092d2329c397ecb32f2bf68a5b1c4bd9193","status":"affected"},{"type":"git","version":"f8434b8ba437d3f6cbcd9ffe8405bd16ed28fc5c","status":"affected"},{"type":"semver","introduced":"6.14.9","fixed":"6.15","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"6.15","status":"affected"},{"type":"semver","introduced":"0","fixed":"6.15","status":"unaffected"},{"type":"semver","introduced":"6.18.21","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"6.19.11","lastAffected":"6.19.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.0","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.14.9","fixed":"6.15"},{"status":"affected","introduced":"6.15.1","fixed":"6.18.21"},{"status":"affected","introduced":"6.19","fixed":"6.19.11"},{"status":"affected","version":"6.15"},{"status":"affected","version":"7.0"},{"status":"affected","version":"7.0"},{"status":"affected","version":"7.0"},{"status":"affected","version":"7.0"},{"status":"affected","version":"7.0"},{"status":"affected","version":"7.0"},{"status":"affected","version":"7.0"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/d472d1a52985211b92883bb64bbe710b45980190","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/1a82c3272626db9006f4c2cad3adf2916417aed6","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/fe757092d2329c397ecb32f2bf68a5b1c4bd9193","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-31475","url":"https://www.cve.org/CVERecord?id=CVE-2026-31475","licence":"CVE Terms of Use","modified":"2026-08-05T12:22:53.935Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-31475","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-31475","licence":"Public domain","modified":"2026-11-11T23:10:00.263Z"}],"updatedAt":"2026-11-25T22:59:19.281Z","epss":{"score":0.0018,"percentile":0.04447,"date":"2026-11-30T12:00:22.000Z"}}