From nobody Thu Oct 03 13:52:34 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XKCmL4815z5YLkd; Thu, 03 Oct 2024 13:52:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XKCmL34hJz4V5j; Thu, 3 Oct 2024 13:52:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727963554; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CyyJMBCKP0bn19SQhEFSE4ZgHdtJ2XsrTfrcX8oH7PQ=; b=TNSbFrIkUJBsyt6Y8a0orRnz+XbypVJdLU/7b11FJBVK5wLo99xSxE7eZwWJVCTlXZu/yq NobYj5lhl/R558BJgDmsoDk8XSyuUKT6E5IzLsTxD5PS7o6lt5CGDW5FLNvEavkWNU1tfb HhP/02fPAMn8ckPD66oaqkNQBs8HE43QW6Z90KxFpLiTRL1W9gbWHybIKRA0pnQyA5IL61 rk6Yp5NddsVX2arWEHHYgMR3d5SOIDQK1vm7Y3D8pJXqVHVIHfT+jzrFcBWz4UnYimdc5i g1bzF1FuuZ0UXJrz7pKcCqFokWWf0goPsq2nx9Cg44OqNN5FnC9TdP1PvEaBow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727963554; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CyyJMBCKP0bn19SQhEFSE4ZgHdtJ2XsrTfrcX8oH7PQ=; b=jegy3pEpopMiEIxYLFsYCOKfDUB3/HBpQzS7kgVY/+UR0dyor0DoRwyCleK2nxvk0Zk57W K4+tccMSqH2xcoGm6Jmu5vuIoVY0UzZgo/9Z9C0gNTFaFshCUrjfirXEsNuFGQ1mgCIa6f LQ51rMClZjJpbanS9rv2C7ubuagr1AcrYgqAoZqoqwdYWZnneArvnbQvzYZaa+LG7DGHaA xFNogQEcOLYbmlfLYpJGpccuiCa0JhX8+XbYyXOVonWTCzBw/jmVxlHt401mRzt7oLhyq0 NfSVlDygA7LoR1Me6xwzdzue/uw5eRoak5/94PXFjgAYmiTkozdwtDOALTNkzg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727963554; a=rsa-sha256; cv=none; b=aIyy1hd/3JgtdUTssGpfHJx1a5uuQ3UBGqNNroujNAqWcHMrr2sLPtEIewwZJeA3o5Bbtq GAmu9UqdWUxEr3JOsPDT5fTDD3ffbhYuaZ22RHYQ3AMvyDCqWiZlJQwfNTdLPlsxFLML5l ksdW330WiRzMmVqFC+MFvl3FYIWI+ig3CH8xzderclOV/bs/D4r9bREi/CiqvG12GOrALr moclHGVThfw5ExvVzQLV7uKOUad3YdrhxuzV1qeLc0ugvezKlLZCe9WOQKOTPJ4OYetVyn t84q1Syzi9/736o3EyVKzW6bJZroi6/n1xz6pAsSAVORBSYwlo45/bqRbiQoCw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XKCmL2h71zstX; Thu, 3 Oct 2024 13:52:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 493DqYgF097300; Thu, 3 Oct 2024 13:52:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 493DqYH4097297; Thu, 3 Oct 2024 13:52:34 GMT (envelope-from git) Date: Thu, 3 Oct 2024 13:52:34 GMT Message-Id: <202410031352.493DqYH4097297@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Toomas Soome Subject: git: 79a0d14fa05c - main - loader: dosfs fails to access directory data with large cluster number List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tsoome X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 79a0d14fa05c75038caa52099289effb85732f88 Auto-Submitted: auto-generated The branch main has been updated by tsoome: URL: https://cgit.FreeBSD.org/src/commit/?id=79a0d14fa05c75038caa52099289effb85732f88 commit 79a0d14fa05c75038caa52099289effb85732f88 Author: Toomas Soome AuthorDate: 2024-10-03 11:54:11 +0000 Commit: Toomas Soome CommitDate: 2024-10-03 13:51:59 +0000 loader: dosfs fails to access directory data with large cluster number fsize is using 2 bytes for cluster number, but with fat32 we actually do have 4 bytes and with large disks the high bytes will be in use. illumos issue: https://www.illumos.org/issues/16821 Sponsored by: MNX Cloud, Inc. MFC after: 1 week --- stand/libsa/dosfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stand/libsa/dosfs.c b/stand/libsa/dosfs.c index 7fbbf65989ae..2ee95bf2c601 100644 --- a/stand/libsa/dosfs.c +++ b/stand/libsa/dosfs.c @@ -815,7 +815,7 @@ fsize(DOS_FS *fs, DOS_DE *de) int n; if (!(size = cv4(de->size)) && de->attr & FA_DIR) { - if (!(c = cv2(de->clus))) { + if (!(c = stclus(fs->fatsz, de))) { size = fs->dirents * sizeof(DOS_DE); } else { if ((n = fatcnt(fs, c)) == -1)