{"api_version":"1","generated_at":"2026-04-23T05:58:04+00:00","cve":"CVE-2026-31475","urls":{"html":"https://cve.report/CVE-2026-31475","api":"https://cve.report/api/cve/CVE-2026-31475.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-31475","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-31475"},"summary":{"title":"ASoC: sma1307: fix double free of devm_kzalloc() memory","description":"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.","state":"PUBLISHED","assigner":"Linux","published_at":"2026-04-22 14:16:44","updated_at":"2026-04-22 14:16:44"},"problem_types":[],"metrics":[],"references":[{"url":"https://git.kernel.org/stable/c/d472d1a52985211b92883bb64bbe710b45980190","name":"https://git.kernel.org/stable/c/d472d1a52985211b92883bb64bbe710b45980190","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/1a82c3272626db9006f4c2cad3adf2916417aed6","name":"https://git.kernel.org/stable/c/1a82c3272626db9006f4c2cad3adf2916417aed6","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/fe757092d2329c397ecb32f2bf68a5b1c4bd9193","name":"https://git.kernel.org/stable/c/fe757092d2329c397ecb32f2bf68a5b1c4bd9193","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-31475","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-31475","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 0ec6bd16705fe21d6429d6b8f7981eae2142bba8 d472d1a52985211b92883bb64bbe710b45980190 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 0ec6bd16705fe21d6429d6b8f7981eae2142bba8 1a82c3272626db9006f4c2cad3adf2916417aed6 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 0ec6bd16705fe21d6429d6b8f7981eae2142bba8 fe757092d2329c397ecb32f2bf68a5b1c4bd9193 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected f8434b8ba437d3f6cbcd9ffe8405bd16ed28fc5c git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 6.15","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.15 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.18.21 6.18.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.19.11 6.19.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.0 * original_commit_for_fix","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"defaultStatus":"unaffected","product":"Linux","programFiles":["sound/soc/codecs/sma1307.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"d472d1a52985211b92883bb64bbe710b45980190","status":"affected","version":"0ec6bd16705fe21d6429d6b8f7981eae2142bba8","versionType":"git"},{"lessThan":"1a82c3272626db9006f4c2cad3adf2916417aed6","status":"affected","version":"0ec6bd16705fe21d6429d6b8f7981eae2142bba8","versionType":"git"},{"lessThan":"fe757092d2329c397ecb32f2bf68a5b1c4bd9193","status":"affected","version":"0ec6bd16705fe21d6429d6b8f7981eae2142bba8","versionType":"git"},{"status":"affected","version":"f8434b8ba437d3f6cbcd9ffe8405bd16ed28fc5c","versionType":"git"}]},{"defaultStatus":"affected","product":"Linux","programFiles":["sound/soc/codecs/sma1307.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"status":"affected","version":"6.15"},{"lessThan":"6.15","status":"unaffected","version":"0","versionType":"semver"},{"lessThanOrEqual":"6.18.*","status":"unaffected","version":"6.18.21","versionType":"semver"},{"lessThanOrEqual":"6.19.*","status":"unaffected","version":"6.19.11","versionType":"semver"},{"lessThanOrEqual":"*","status":"unaffected","version":"7.0","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.18.21","versionStartIncluding":"6.15","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.19.11","versionStartIncluding":"6.15","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.0","versionStartIncluding":"6.15","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.14.9","vulnerable":true}],"negate":false,"operator":"OR"}]}],"descriptions":[{"lang":"en","value":"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."}],"providerMetadata":{"dateUpdated":"2026-04-22T13:54:04.113Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"references":[{"url":"https://git.kernel.org/stable/c/d472d1a52985211b92883bb64bbe710b45980190"},{"url":"https://git.kernel.org/stable/c/1a82c3272626db9006f4c2cad3adf2916417aed6"},{"url":"https://git.kernel.org/stable/c/fe757092d2329c397ecb32f2bf68a5b1c4bd9193"}],"title":"ASoC: sma1307: fix double free of devm_kzalloc() memory","x_generator":{"engine":"bippy-1.2.0"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2026-31475","datePublished":"2026-04-22T13:54:04.113Z","dateReserved":"2026-03-09T15:48:24.098Z","dateUpdated":"2026-04-22T13:54:04.113Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-04-22 14:16:44","lastModifiedDate":"2026-04-22 14:16:44","problem_types":[],"metrics":[],"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"31475","Ordinal":"1","Title":"ASoC: sma1307: fix double free of devm_kzalloc() memory","CVE":"CVE-2026-31475","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"31475","Ordinal":"1","NoteData":"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.","Type":"Description","Title":"ASoC: sma1307: fix double free of devm_kzalloc() memory"}]}}}