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 E8FE03C3425 for ; Fri, 1 May 2026 14:17:52 +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=1777645073; cv=none; b=Rd8XKZuydytUBSTc75BSV9P7jVmy3Xm16h5srji30E+fYGiOC76cwUHdpxClmKFP2jxcaXbLR36l+wa3mqRNmfMEOOpBBzT9gMowiRgwp/NnYENyxpXTP8vTup/a9Wy8Hzwq2pwUjk26mAZeo5Ag9pt9Gf/mySrczYZS55xHjXg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777645073; c=relaxed/simple; bh=Ovp8409Pjswf7FnKVf6zSgcOtefuGqxuU0FSTgk+CSE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Qmi9MJ1AobDRXynEv1EOlcDXUskxkwIdKK0FOmmIN2uATu7EwleXlAkDaHSV7qW5O+GJ2RztZC44tBmTKFxagxCplLjEODI2IuOMrYx2SLqHR9VN/WAM6q2fM7HBrkzvfHSMoGZ7u44mJ8XDjYZs7IKWMnL7K5lopjd4JmdgaDY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=y8mSPlKo; 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="y8mSPlKo" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7CF52C2BCB4; Fri, 1 May 2026 14:17:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1777645072; bh=Ovp8409Pjswf7FnKVf6zSgcOtefuGqxuU0FSTgk+CSE=; h=From:To:Cc:Subject:Date:Reply-To:From; b=y8mSPlKojWmCdK3tqUVxIi7Gx+ZTSUXwXxRJ1vv35WpJMO3f9ljvIwtNh7ST+Y356 fY9M1uKs0KF722UYONLnCz/17ntiWX16rWT+yclVyM789owjw38ovWWuJq22FKr8ht fH/8zOcn/r/Hk0SvJo8QqVk5xPTeXYp4TAJ9Bas0= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-31745: reset: gpio: fix double free in reset_add_gpio_aux_device() error path Date: Fri, 1 May 2026 16:14:56 +0200 Message-ID: <2026050141-CVE-2026-31745-566d@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=2156; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=wTNlpXKhbkXsEF0CRm8O7JHJTWQR0hoJ6XYu/q5ZLpk=; b=owGbwMvMwCRo6H6F97bub03G02pJDJlftgZWzPqRsWDB17lTBA/VZDgfTP2qaWIyl8eh85bHd CkBjWOHO2JZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAi3qYMC5Yafehhv1Vc6XQw 6lWBp/O8s2GvhRnmGT2rsWSrP/Y/9GK63vwJViIVasn/AA== 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: reset: gpio: fix double free in reset_add_gpio_aux_device() error path When __auxiliary_device_add() fails, reset_add_gpio_aux_device() calls auxiliary_device_uninit(adev). The device release callback reset_gpio_aux_device_release() frees adev, but the current error path then calls kfree(adev) again, causing a double free. Keep kfree(adev) for the auxiliary_device_init() failure path, but avoid freeing adev after auxiliary_device_uninit(). The Linux kernel CVE team has assigned CVE-2026-31745 to this issue. Affected and fixed versions =========================== Issue introduced in 6.19 with commit 5fc4e4cf7a2268b5f73700fd1e8d02159f2417d8 and fixed in 6.19.12 with commit 1de465753220deb41569cf2add87bbb0673731db Issue introduced in 6.19 with commit 5fc4e4cf7a2268b5f73700fd1e8d02159f2417d8 and fixed in 7.0 with commit fbffb8c7c7bb4d38e9f65e0bee446685011de5d8 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-31745 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: drivers/reset/core.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/1de465753220deb41569cf2add87bbb0673731db https://git.kernel.org/stable/c/fbffb8c7c7bb4d38e9f65e0bee446685011de5d8