From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796048685; b=vX7nw6bAWRkQzs/EZ0yVC23V1gwIeKCwsMQUFCKhobzbC5tXOdkAThh3zkUJ0C7rbf23 OcpsjSP/C6EUzpZFCKGyxM1PH18mKI17LX8p+pNxEbuxZMejDimpkQ04oWSp4iTqDdCfe Vy1d96A6+BXpcX+w6Tb4wR8mP1lcCL9eDybb8z98oDXpH+ciRNI1othzVNmDPYl+6DQiH J4AzhYMpCtle4nZ/B0FDV05zo8mFaICbjlrghY+yGNR/vvVgNF32MH7Y15T/dJAfYepec gZbvENcP2ShJcu6fH1RLoHoktB+lMgkLRkJ0Rmw2c2FplDcHo206UE3uRkfivQxH39g== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796048685; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: Reply-To:MIME-Version:Lines:X-Developer-Signature:X-Developer-Key: Content-Transfer-Encoding; bh=rvYAcDP11V2iNtAEy5ZrsEtoe6WwwILxST3X3+LT1Oo=; b=Xd1Z8/fbmI4kIJRbbw4VHp0aENPO9nOBwJEAeGzgAtEVxdfeaLq5VKPkpC9yEKWAWiM9 cNzH00kdrA8nQzXlGMvZaqqGeK1I5N692nnf9KRzu+lL6DNgEGVmxsKj5qzgraq+w69zj sD3gEHaPlU5k4JvmyCQmZTd2Y8f98O1Eir9x5IVqJrKq22zyCoSj8TzBLqisHZ2h8XjLO 1TIepqz/EPd0G74+hBO6IeoRQ/H1F5iEFsBkvYWT4gWUsL/sSbIAkDk20eV2lWEaDAEcR FdZM6NcdWFW+TVEV62dtIgTYrxWRdkRDYuWAVKCiF5aOFwBSdAFf1U0SN3sGdTSum7A== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=oDgKpEGN; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BD5B0606A329 for ; Mon, 30 Nov 2026 14:24:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=oDgKpEGN Received: by smtp.kernel.org (Postfix) with ESMTPSA id AC9BC1F00933; Mon, 30 Nov 2026 14:24:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796048685; bh=rvYAcDP11V2iNtAEy5ZrsEtoe6WwwILxST3X3+LT1Oo=; h=From:To:Cc:Subject:Date:Reply-To; b=oDgKpEGNufg6PE3fRIQH/50jlb76mBudHKgxQwyE2dlPTuBaAdgXts1d09z1qXiKv V+Q+ZOYKrCvzrgkU6E96oxhl114SwbE3hErSlXnWvKfA/KOyeSD13kslYCVyecZ7oo WTGtiZSEvj9QUbnEpgHbhpwASB8CGhCKRXWmcA0o= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-139679: md/raid5: reject a per-device size smaller than one chunk Date: Mon, 30 Nov 2026 14:41:28 +0100 Message-ID: <2026113019-CVE-2026-139679-15cd@gregkh> X-Mailer: git-send-email 2.56.1 Reply-To: , X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3766; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=YgxXFj9N+t36Nf2biG2J+L2swduvDmFoZNq/j8xskg8=; b=owGbwMvMwCRo6H6F97bub03G02pJDNm81fKuxc7r5mfFbXQ/cefsjVuLjk3+argtcbv3JokXv IyMLS65HbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjCRDSYMC66HR9t9VDvcdqgn zHgJ3/cFTyv+RzDM05Opeq6oaij65UViqfRLtcwHE+b3AwA= 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: md/raid5: reject a per-device size smaller than one chunk Both raid5_run() and raid5_resize() align the per-device size down to a whole multiple of the chunk size: mddev->dev_sectors &= ~(chunk_sectors - 1); Neither checks the result, so a size smaller than one chunk silently becomes zero. In raid5_run() that is harmless: the array size is derived from the same zero, so the disk just ends up with no capacity. In raid5_resize() it leaves the array inconsistent -- mddev->dev_sectors becomes zero, while mddev->array_sectors and the gendisk capacity keep the previous. A later raid4/raid5 -> raid0 takeover copies the zero into every rdev->sectors (raid0_takeover_raid45()), so create_strip_zones() builds a strip zone table whose zone_end is zero. Any read then passes bio_check_eod() against the stale capacity and hits the BUG() in find_zone(): kernel BUG at drivers/md/raid0.c:318! Oops: invalid opcode: 0000 [#1] SMP KASAN NOPTI Call Trace: raid0_make_request md_handle_request submit_bio_noacct_nocheck block_read_full_folio read_part_sector bdev_disk_changed bdev_open Reject a size smaller than one chunk in both functions, so that a running raid4/raid5 array always has mddev->dev_sectors >= one chunk. The check is done where the value takes effect, not where it is assigned. mddev->dev_sectors is written from several places, and none of them can tell whether the value is usable: the chunk size may still change later. raid5_run() and raid5_resize() are where every input is final, so one check in each covers them all. The Linux kernel CVE team has assigned CVE-2026-139679 to this issue. Affected and fixed versions =========================== Issue introduced in 3.11 with commit eea136d69f9facb2d3807386bbac1e6b1161795f and fixed in 6.12.119 with commit ffee6e3374c17a75cb4574a3fd289272dc64a090 Issue introduced in 3.11 with commit eea136d69f9facb2d3807386bbac1e6b1161795f and fixed in 6.18.65 with commit 58a851e4fa0921f0293568a7031ff6f9193ad167 Issue introduced in 3.11 with commit eea136d69f9facb2d3807386bbac1e6b1161795f and fixed in 7.3.6 with commit 45df58239521644da57fa99c264ed2f14e8f3f21 Issue introduced in 3.11 with commit eea136d69f9facb2d3807386bbac1e6b1161795f and fixed in 7.4-rc1 with commit 370ca0760b18c64592a258bcb057ff0a2531aabf 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-139679 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/md/raid5.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/ffee6e3374c17a75cb4574a3fd289272dc64a090 https://git.kernel.org/stable/c/58a851e4fa0921f0293568a7031ff6f9193ad167 https://git.kernel.org/stable/c/45df58239521644da57fa99c264ed2f14e8f3f21 https://git.kernel.org/stable/c/370ca0760b18c64592a258bcb057ff0a2531aabf