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 A21883C9432 for ; Fri, 3 Apr 2026 15:27:35 +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=1775230055; cv=none; b=ofEmZltOWc+c1QiSaYzQ6Y3/Bl/tzKz3+jM3GhGrx0FGeOZTWW5jT9OR1OUC9xqtAYtGMpZTZfsHsivytrhBtg2p8/cJiqFz6bj2GYTDJxkNiWAm/7yhRS3X7PbeCLMd46akg6meOij+wadzAz/qDWetNkF6ZQzVkDmZxZF38Ew= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775230055; c=relaxed/simple; bh=N63ATFzRlJgc0uu/DKzLHWeCgwQOpDChtdOw6OAS3K8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=WGRj6JPyOY+KtUxXxidFGZZRqbvgiYzaY5AxZ4Mmg+oUwi73XK/RUu0fd5bli+VJNPQdSND94Fls3JONzx/35Of2PhN4EeJJpq+joCUWmE58YtQgEedTGjIxQ2BkB+pYsBSzQPl5TjWaEMpCVK4mD7HgmQE/58MqTUYik4cmQX0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=tWAmPkUX; 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="tWAmPkUX" Received: by smtp.kernel.org (Postfix) with ESMTPSA id F3717C4CEF7; Fri, 3 Apr 2026 15:27:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1775230055; bh=N63ATFzRlJgc0uu/DKzLHWeCgwQOpDChtdOw6OAS3K8=; h=From:To:Cc:Subject:Date:Reply-To:From; b=tWAmPkUXXlPFI1r1svGi4r66c2XJNe64tSbh5irfOlRZJdTN3gAp+5zrVPVTF256j XSAgpygO8QtiXjSJLnoXM5fxiM85Ta29AsfaF1EknQmzRCqQ4nT7WjctTG3sFEaBtC LhORYTQwiU1bK2rweqBMDxJxrI5kbYIrP8MAaJgE= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-31389: spi: fix use-after-free on controller registration failure Date: Fri, 3 Apr 2026 17:18:57 +0200 Message-ID: <2026040324-CVE-2026-31389-036b@gregkh> X-Mailer: git-send-email 2.53.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=2894; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=Ry1s6BuVAa5zNiJ7QpOhKxIvohlL+5V3BsuSqlABxtk=; b=owGbwMvMwCRo6H6F97bub03G02pJDJnnbzkcbV/9OW2Kzand0RucexjVo3W+RK69duN8z0rpb 8ui7H2EOmJZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAim4UY5vt9cDFvSjghU9vH zeDmfOxg11EDEYYF159fZ9m5+pjrXzbxzbf+m/BND73xDwA= 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: spi: fix use-after-free on controller registration failure Make sure to deregister from driver core also in the unlikely event that per-cpu statistics allocation fails during controller registration to avoid use-after-free (of driver resources) and unclocked register accesses. The Linux kernel CVE team has assigned CVE-2026-31389 to this issue. Affected and fixed versions =========================== Issue introduced in 6.0 with commit 6598b91b5ac32bc756d7c3000a31f775d4ead1c4 and fixed in 6.1.167 with commit 0e23f50086da7d0b183dfeac26021acfcdee086b Issue introduced in 6.0 with commit 6598b91b5ac32bc756d7c3000a31f775d4ead1c4 and fixed in 6.6.130 with commit 6bbd385b30c7fb6c7ee0669e9ada91490938c051 Issue introduced in 6.0 with commit 6598b91b5ac32bc756d7c3000a31f775d4ead1c4 and fixed in 6.12.78 with commit afe27c1f43aa57530011f419be6ddf71306565d2 Issue introduced in 6.0 with commit 6598b91b5ac32bc756d7c3000a31f775d4ead1c4 and fixed in 6.18.20 with commit 80f3e8cd2b4ad355b2ad2024cf423f6d183404f7 Issue introduced in 6.0 with commit 6598b91b5ac32bc756d7c3000a31f775d4ead1c4 and fixed in 6.19.10 with commit 23b51bad2eb8787aa74324cfccefb258515ae5ba Issue introduced in 6.0 with commit 6598b91b5ac32bc756d7c3000a31f775d4ead1c4 and fixed in 7.0-rc5 with commit 8634e05b08ead636e926022f4a98416e13440df9 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-31389 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/spi/spi.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/0e23f50086da7d0b183dfeac26021acfcdee086b https://git.kernel.org/stable/c/6bbd385b30c7fb6c7ee0669e9ada91490938c051 https://git.kernel.org/stable/c/afe27c1f43aa57530011f419be6ddf71306565d2 https://git.kernel.org/stable/c/80f3e8cd2b4ad355b2ad2024cf423f6d183404f7 https://git.kernel.org/stable/c/23b51bad2eb8787aa74324cfccefb258515ae5ba https://git.kernel.org/stable/c/8634e05b08ead636e926022f4a98416e13440df9