Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0493E3CE49D for ; Wed, 22 Apr 2026 13:55:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776866150; cv=none; b=buIB1ysN4IcJ3ZmjqcHAVihT1L7LGmw++NycKH+105npbQsEt1JnPUyE1kvFiNUjCHJmisa9CPH0nZ9u82E/YuWJFIT4VbWrJnNsdG2u1ZmR8MkJbK+XfCIHymEwiu06xukOgcaWd3gldLlPBWhAeDto9GFUWajvQrX9sSSpanY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776866150; c=relaxed/simple; bh=Aff7/1CCO/GAlUU/J7uLPRxZS3plnpOo42wqj+Qg4Bk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=QcAHAlnAdSXT0JtCearecpNaTGqzQ8VCePf8v1fWhgUp0Abp2poepiHhxtCR+cKdpmCO29YshRvJwxJs9p7XSi4zCJt/y+82IaMfXIRuJK86Z6hZaMQ+xDxSMiMQuXwS9+GUbytdrCHr+5ncX02YjH4koESPMFK/V/jUtSrBKlI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=lbJ24yW1; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="lbJ24yW1" Received: by smtp.kernel.org (Postfix) with ESMTPSA id F39B3C19425; Wed, 22 Apr 2026 13:55:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1776866149; bh=Aff7/1CCO/GAlUU/J7uLPRxZS3plnpOo42wqj+Qg4Bk=; h=From:To:Cc:Subject:Date:Reply-To:From; b=lbJ24yW1rwafgU7v2+FyrN1TH5Sj8ObW6rPM+/imo/SKjp68lbbkgsgIHhUgLmMWg YUsdHdj709zAK8SUa6uUICgkYPzjTIq8ypyihhKQhnsHo85Dx/MP2nwOUK3+ro/Dhx ZdqDjlveAaAJdQ76YO3ws47FyIwOWlfCGwGIQvzE= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-31475: ASoC: sma1307: fix double free of devm_kzalloc() memory Date: Wed, 22 Apr 2026 15:54:21 +0200 Message-ID: <2026042256-CVE-2026-31475-74ed@gregkh> X-Mailer: git-send-email 2.54.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2534; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=GdGL/W+fU8h4akINovGX+HVOcAwnWcI5h+3Gaq0ZtAk=; b=owGbwMvMwCRo6H6F97bub03G02pJDJkvLn2pmCmn92XNZfH/JVlaEvPPbHh0UHPtt8StX259n 3Unbau2dkcsC4MgE4OsmCLLl208R/dXHFL0MrQ9DTOHlQlkCAMXpwBMZFMlw4Jzzfd/n5zl/dDH Y5ZZHcdvoXfH38kxzFPLj0/j9eVYd3X3oZqIOZWTfn3KyQEA X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: ASoC: sma1307: fix double free of devm_kzalloc() memory A previous change added NULL checks and cleanup for allocation failures in sma1307_setting_loaded(). However, the cleanup for mode_set entries is wrong. Those entries are allocated with devm_kzalloc(), so they are device-managed resources and must not be freed with kfree(). Manually freeing them in the error path can lead to a double free when devres later releases the same memory. Drop the manual kfree() loop and let devres handle the cleanup. The Linux kernel CVE team has assigned CVE-2026-31475 to this issue. Affected and fixed versions =========================== Issue introduced in 6.15 with commit 0ec6bd16705fe21d6429d6b8f7981eae2142bba8 and fixed in 6.18.21 with commit d472d1a52985211b92883bb64bbe710b45980190 Issue introduced in 6.15 with commit 0ec6bd16705fe21d6429d6b8f7981eae2142bba8 and fixed in 6.19.11 with commit 1a82c3272626db9006f4c2cad3adf2916417aed6 Issue introduced in 6.15 with commit 0ec6bd16705fe21d6429d6b8f7981eae2142bba8 and fixed in 7.0 with commit fe757092d2329c397ecb32f2bf68a5b1c4bd9193 Issue introduced in 6.14.9 with commit f8434b8ba437d3f6cbcd9ffe8405bd16ed28fc5c Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community. Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at https://cve.org/CVERecord/?id=CVE-2026-31475 will be updated if fixes are backported, please check that for the most up to date information about this issue. Affected files ============== The file(s) affected by this issue are: sound/soc/codecs/sma1307.c Mitigation ========== The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits: https://git.kernel.org/stable/c/d472d1a52985211b92883bb64bbe710b45980190 https://git.kernel.org/stable/c/1a82c3272626db9006f4c2cad3adf2916417aed6 https://git.kernel.org/stable/c/fe757092d2329c397ecb32f2bf68a5b1c4bd9193