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=1795056963; b=IUe2npofGg0XjLPRm/VM1g8CX/6MWmo207KBQBaWfjR8IsdG3JopF8CJm+5cdAwnGIQ2 FRG3+cKnnO/3EG/j5NFgmrgzAwf59A5hRxgrYzdv4G8CrBURtQPgXsy3zncwQ2Ek/7L79 pqpWQL2gbfaIhEhkdBmpsVb21JvzycNfVutJQOFNt+jvY2nSq2FYZ+CuRqJOYrhxj0sgP fJmH6jNUV3YgUGIHs8rita6WKstmAL7Y7anAZ6LE+RWi2UvBxrWa4XMJyO1o4qMBc+1VR mn9y8Wd9VGwxHTLGmXBQ7xToL3BiqmxIyVyDhSyTsvEc/2RRDQj5hWtzuEemJ7Xp1mA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795056963; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=zNUNowRdBdQsTMeeYnOmTgl+WmP0ldBWKP0vppfvmMg=; b=udahXW8h2iBMHHh58PPiLfl0AN2PTPGCWZwbYC6xyi0Jk83ByevDak6FHALvU61y5Vit BPUEvThqs7yEsrxxRo6EtGOlevIk6iwS/0zVhCkOFmFOzA0m7LAYlBUNLmwy6WPDAlS6/ IJTj5XXpJUGe80SCHAW/JOlXRnWO68AiyWTgqlpVYOUfsWy/WkXHQmlZVQ7iG2zrWb7OJ iKoNuFEy6jtbGMmwBoyMP45KQs1FopbGVWauHIVgaOsk/N+MahOtuVEptJJ30yFGufn5b 4fJzx5BXg/tI4Tgns8atJqYQXTkBIbGjE/9hZ99YP+C3NixUYc4Uy14GawLGi+a8THQ== 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=jCq58Te+; 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 9DF7E606A325; Thu, 19 Nov 2026 02:56:03 +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=jCq58Te+ Received: by smtp.kernel.org (Postfix) with ESMTPSA id F376A1F000C4; Thu, 19 Nov 2026 02:56:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1795056963; bh=zNUNowRdBdQsTMeeYnOmTgl+WmP0ldBWKP0vppfvmMg=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=jCq58Te+5WakiJHWKUWnJARVMWfSYkrBs+8ZMIgCeVB/Xf8yGAocUngJ0qb84fvV0 RNRE12aDwjl4kBfrFNyDyZnWle4wo0t+QvamkerOmVjN0SSikq9YbXcLWeeFkH7mcT 0+F0vY2JnZiyFr/3NPnIcGoZiXbnV+mEDJLiDhME= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Josef Bacik , Jens Axboe , Sasha Levin Subject: [PATCH 5.15 2176/2214] block: partitions/mac: compute the sectors in 64 bits Date: Wed, 18 Nov 2026 16:04:12 +0100 Message-ID: <20261118150137.435288463@linuxfoundation.org> X-Mailer: git-send-email 2.56.0 In-Reply-To: <20261118150009.797899913@linuxfoundation.org> References: <20261118150009.797899913@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: patches@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Josef Bacik [ Upstream commit 6c55f94317249bc195e197f6a8730c843e72ea8c ] start_block and block_count are converted to 512 byte sectors in 32-bit arithmetic, although put_partition() takes a sector_t. With a block size above 512 bytes anything beyond 2TiB wraps and the partition lands on top of another one. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Josef Bacik Link: https://patch.msgid.link/20261028164415.1262013-43-axboe@kernel.dk Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin --- block/partitions/mac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/block/partitions/mac.c b/block/partitions/mac.c index 6415213cd184e..f07f01dfe6287 100644 --- a/block/partitions/mac.c +++ b/block/partitions/mac.c @@ -95,8 +95,8 @@ int mac_partition(struct parsed_partitions *state) if (be16_to_cpu(part->signature) != MAC_PARTITION_MAGIC) break; put_partition(state, slot, - be32_to_cpu(part->start_block) * (secsize/512), - be32_to_cpu(part->block_count) * (secsize/512)); + (sector_t)be32_to_cpu(part->start_block) * (secsize/512), + (sector_t)be32_to_cpu(part->block_count) * (secsize/512)); if (!strncasecmp(part->type, "Linux_RAID", 10)) state->parts[slot].flags = ADDPART_FLAG_RAID; -- 2.53.0