From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 B5C7335E1AC for ; Sat, 15 Aug 2026 06:14:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786774445; cv=none; b=PcBg9OIzs7/egGgOTEbhh2y46GpY7AWhS0IWFsLIDWevS+3SytbA/pG2Oip/nz7DRL+uRJCMjjfGwSLEy9z+amMkhzZJVL1oMs/TNLqVGlXTBOARgHbLpaDnFCpcc7YHCdNUieUQLAm6T443kRr1RdebjMDes+yexmX6Qm5fh7U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786774445; c=relaxed/simple; bh=VJqo0/RUq8Mc5BKJsKHyHenePEuP/CfENmg8wTv+B9g=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=VEPtHsSVfBPJGnkGa1+0Vc6no5ysSqtWDeBhoZf8cJ8cHSneUlJNzeq0utiW2qp4K1cvnpaqIjOtx819bL+xnd68O/bxrvTefVxwwkPyi7mc2NsnsViPf57+xhE9f4yPToOBfOgu5/CPsxkO7XM8DOYU2qsVGCjE4be+6FLH5dE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=tZub7ybm; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="tZub7ybm" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 192811F000E9; Sat, 15 Aug 2026 06:14:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1786774444; bh=akBNzhid8fnxhHEnKdRJxSXlPYRDTHrM65fS75TwrZY=; h=From:To:Cc:Subject:Date:Reply-To; b=tZub7ybmqDitVGxY2oVMdIf7lFXj3s4RNvq6QXB40NeENU5Qbp/Vrm+FmdXe3Be1z h+6+DUU3U+KBqmUiz5ezX37K0OGXp/CXWHtXjE2I54F97MJyXozSflP3+eQWtM30GU zy0/UtFVZGBX5k3t5lCEig7ggpmbevxuuGsERcVQ= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-72155: mtd: spi-nor: swp: Improve locking user experience Date: Sat, 15 Aug 2026 15:03:54 +0900 Message-ID: <2026081535-CVE-2026-72155-8ba3@gregkh> X-Mailer: git-send-email 2.55.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=3592; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=Zr7e764YtVfMJb2wa4nR9cr3Z6rr1HRSNk3WhlgVtvo=; b=owGbwMvMwCRo6H6F97bub03G02pJDFkNDPt5WjQXJa328ZNbrD9vUeDN3OwgtX+B3+OPeQQ2T 67JmHmuI5aFQZCJQVZMkeXLNp6j+ysOKXoZ2p6GmcPKBDKEgYtTACZy5j7DfJcqGQPPvfX9R87O SpJ44CIp9HFtG8P8bP0FOg7LVcUMLmU9rNn9oE9XQOAqAA== 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: mtd: spi-nor: swp: Improve locking user experience In the case of the first block being locked (or the few first blocks), if the user want to fully unlock the device it has two possibilities: - either it asks to unlock the entire device, and this works; - or it asks to unlock just the block(s) that are currently locked, which fails. It fails because the conditions "can_be_top" and "can_be_bottom" are true. Indeed, in this case, we unlock everything, so the TB bit does not matter. However in the current implementation, use_top would be true (as this is the favourite option) and lock_len, which in practice should be reduced down to 0, is set to "nor->params->size - (ofs + len)" which is a positive number. This is wrong. An easy way is to simply add an extra condition. In the unlock() path, if we can achieve the same result from both sides, it means we unlock everything and lock_len must simply be 0. A comment is added to clarify that logic. The Linux kernel CVE team has assigned CVE-2026-72155 to this issue. Affected and fixed versions =========================== Issue introduced in 4.6 with commit 3dd8012a8eeb3702fa17450ec1a16a3f38af138d and fixed in 6.1.178 with commit 9a0d8dec3d11ca95d67537ea8fa6ee2730a5038a Issue introduced in 4.6 with commit 3dd8012a8eeb3702fa17450ec1a16a3f38af138d and fixed in 6.6.145 with commit dc341272cf8e15a2c511db3c4df5dab8adf70ad0 Issue introduced in 4.6 with commit 3dd8012a8eeb3702fa17450ec1a16a3f38af138d and fixed in 6.12.97 with commit 6110ab5ffd84e8daa654652446a03ce2f77580a7 Issue introduced in 4.6 with commit 3dd8012a8eeb3702fa17450ec1a16a3f38af138d and fixed in 6.18.40 with commit c0806df5cf806545160f3fdac3c888926ceac557 Issue introduced in 4.6 with commit 3dd8012a8eeb3702fa17450ec1a16a3f38af138d and fixed in 7.1.5 with commit 12d4d69221159e6d0e72400ec81195d691169b53 Issue introduced in 4.6 with commit 3dd8012a8eeb3702fa17450ec1a16a3f38af138d and fixed in 7.2-rc1 with commit e1d456b26bf23e30db305a6184e8abd9ab68bbf2 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-72155 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/mtd/spi-nor/swp.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/9a0d8dec3d11ca95d67537ea8fa6ee2730a5038a https://git.kernel.org/stable/c/dc341272cf8e15a2c511db3c4df5dab8adf70ad0 https://git.kernel.org/stable/c/6110ab5ffd84e8daa654652446a03ce2f77580a7 https://git.kernel.org/stable/c/c0806df5cf806545160f3fdac3c888926ceac557 https://git.kernel.org/stable/c/12d4d69221159e6d0e72400ec81195d691169b53 https://git.kernel.org/stable/c/e1d456b26bf23e30db305a6184e8abd9ab68bbf2