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 97CBF1DDCE for ; Sun, 19 May 2024 10:11:59 +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=1716113519; cv=none; b=H7Cap7KkOE2G9sC1XJ0CqCuzDUL1ie8BUSd9nguMEYHLpTyFQ3zGpF5N0zac1eArhKvFdW8qRLSZzYPCd4TswIaEhQJTPhhtjNYELw85vF06qDptnpqy7/e2U++zgV66szmVRfSui1z5ceaj+IPfjiB0/7UN6qYnfqch8oeNTfc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716113519; c=relaxed/simple; bh=yRGGt1k20pamMnBp+8Zaqs9XndBUpIjAx6a6OE7zofY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=VyIdcELaRNvluJuNi79df+ZoW8cF9ZgdSCouweF35B2VgIMB2uArSlZlCZB8yehIenSex94GgcXSqhnhEHhCiVLHGJTWUOycOD6f3Zwjud1+5BSgwIihUpEE4ayjzJjkYLzFlVOfXBo6ntpYwTW1c5UVG3fx7pEY7kzFZS8t4M4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=BA/STxCh; 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="BA/STxCh" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1D300C32781; Sun, 19 May 2024 10:11:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1716113519; bh=yRGGt1k20pamMnBp+8Zaqs9XndBUpIjAx6a6OE7zofY=; h=From:To:Cc:Subject:Date:Reply-to:From; b=BA/STxChuU7E5aEhR8ZQlxomWFZ+A3om5/25jHrZ4M3EAc+oSZ0nFqS3CJOHCvbkc GPfuQbhbQplK2Js0BeRIuOtUggKBzNufVLuiyljTjP6yz886S2t1OaLjlSA6kQj/l1 3qhrPxLYhaqr8auCWI9wYxV6B1pF72erXXX9Ov5g= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-35936: btrfs: handle chunk tree lookup error in btrfs_relocate_sys_chunks() Date: Sun, 19 May 2024 12:11:30 +0200 Message-ID: <2024051918-CVE-2024-35936-990c@gregkh> X-Mailer: git-send-email 2.45.1 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: , X-Developer-Signature: v=1; a=openpgp-sha256; l=2862; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=yRGGt1k20pamMnBp+8Zaqs9XndBUpIjAx6a6OE7zofY=; b=owGbwMvMwCRo6H6F97bub03G02pJDGmeF9wiz7HP2tW/JXtWoWqK6eX8c/Pv81yau0bp7I84d ZuLykH9HbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjCRPWoM82yOX14w0zjxpOqC YNY5mZtWPC0+JsKwoPfFpj6Rvj/2DayX93kIBdQp/3W5BAA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit Description =========== In the Linux kernel, the following vulnerability has been resolved: btrfs: handle chunk tree lookup error in btrfs_relocate_sys_chunks() The unhandled case in btrfs_relocate_sys_chunks() loop is a corruption, as it could be caused only by two impossible conditions: - at first the search key is set up to look for a chunk tree item, with offset -1, this is an inexact search and the key->offset will contain the correct offset upon a successful search, a valid chunk tree item cannot have an offset -1 - after first successful search, the found_key corresponds to a chunk item, the offset is decremented by 1 before the next loop, it's impossible to find a chunk item there due to alignment and size constraints The Linux kernel CVE team has assigned CVE-2024-35936 to this issue. Affected and fixed versions =========================== Fixed in 4.19.312 with commit bebd9e0ff900 Fixed in 5.4.274 with commit 576164bd01bd Fixed in 5.10.215 with commit 87299cdaae75 Fixed in 5.15.155 with commit d1ffa4ae2d59 Fixed in 6.1.86 with commit 36c2a2863bc3 Fixed in 6.6.27 with commit 0d23b34c68c4 Fixed in 6.8.6 with commit 1f9212cdbd00 Fixed in 6.9 with commit 7411055db5ce 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-2024-35936 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: fs/btrfs/volumes.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/bebd9e0ff90034875c5dfe4bd514fd7055fc7a89 https://git.kernel.org/stable/c/576164bd01bd795f8b09fb194b493103506b33c9 https://git.kernel.org/stable/c/87299cdaae757f3f41212146cfb5b3af416b8385 https://git.kernel.org/stable/c/d1ffa4ae2d591fdd40471074e79954ec45f147f7 https://git.kernel.org/stable/c/36c2a2863bc3896243eb724dc3fd4cf9aea633f2 https://git.kernel.org/stable/c/0d23b34c68c46cd225b55868bc8a269e3134816d https://git.kernel.org/stable/c/1f9212cdbd005bc55f2b7422e7b560d9c02bd1da https://git.kernel.org/stable/c/7411055db5ce64f836aaffd422396af0075fdc99