From nobody Thu Oct 10 12:55:25 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 4XPV995Gcdz5Z10w; Thu, 10 Oct 2024 12:55:25 +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 4XPV993g1vz4RNj; Thu, 10 Oct 2024 12:55:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728564925; 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=SQ4b0ZV6GMCCDP3EmqOaxwE5jrR6EplE7Z9DHcWmO/0=; b=bFvnMvpZDTaUNymCi4OUU+RPbdcg58jQmpUq3KInd61Aul2XrA5E2801nXQ5Z8LbHnuzLq EiRjm1C2FgbKfnNeDWkUfXMF39Vv5ggGEcQx3nckHWC4Cs6wi/YogbeEfFRlWrZtE8Y/z8 JdJvcfzvWff43q0x1myodBuZcXOhVlK4VyNJ+vf13UMRiRU1AHcqXxtyhIFs6C+qBgqKFD 2J8oV+Xn9jkRS8g2x0cXhxctur7ZdETr9MBBPdmDgDeCE6F5mEpBlM5BvKThqpbMB7Gd6o 29laZeZ3cHCtUuqME5MTPE1a2DpOemV3thqJzAkEofSbr4+7f9KkcudPy8OyZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728564925; 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=SQ4b0ZV6GMCCDP3EmqOaxwE5jrR6EplE7Z9DHcWmO/0=; b=LsmfRUCOH3yYg1CNeQbQzwcUapTTFyRtOzBhlfws7m91yi+0zO7k7V1w6H67Sl2zo0S2Nr ivOec2imiFGSMEtAM9jnh8Z3OvHpx26GJGl7mdNBoVG2JHvbph1/J+HMWlS0dBjv9XiBXk Z563V7/RYhzlURARQyknW2QGv2QCnw8a4y/02ZsDqCNaek7LuEUOOyU/sr3Y70TwMr4voj JwiIWNP82Nv8KeT69cv9RSfs1Bqs8zUtf0kPWPU9yWak93r1I7gwvzn2lIlQsqMZ3xsnRE LsmGSfVX8pFsVjG1dgq7tE/uMFCb+M4JPvMNF8KOtwtQcqCZPLepinHnhk4SUA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728564925; a=rsa-sha256; cv=none; b=PYP+KQDmINIWXh/x5l09u3zojXGf65yZo/BdXqKj4tu3lKyPw4cbmqmyrgmvl/gqMDTC4p 311/ULlZIXbLqolBvvQI3GQH3JjQLADQyX5pD2EAZyCGa/HEHNXLAcOjK2sAYaq27hGT75 O+4WQbjCVc7OK6jmGtvYBUidfUjh6NBfxha728IHNoew6mdHWKsxdFTR9UBC1fsi2UIFqE iYH6bCs5SENVlv2aJStoe352nXrs2NaeN9COHFb1OJDOtJDGOtgmsBm4lRlfy3I0n2S8UD qEDzUl3TDBJbiFOJguwHp5VNhwyMz2nZvTt8P4soktE3lfi2lj1gQ7J0i5hFvA== 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 4XPV9938mYzyZp; Thu, 10 Oct 2024 12:55:25 +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 49ACtPrs040962; Thu, 10 Oct 2024 12:55:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49ACtP8V040959; Thu, 10 Oct 2024 12:55:25 GMT (envelope-from git) Date: Thu, 10 Oct 2024 12:55:25 GMT Message-Id: <202410101255.49ACtP8V040959@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Toomas Soome Subject: git: c66f901b8e41 - stable/13 - 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/stable/13 X-Git-Reftype: branch X-Git-Commit: c66f901b8e4101435a1671fb943031198361beb1 Auto-Submitted: auto-generated The branch stable/13 has been updated by tsoome: URL: https://cgit.FreeBSD.org/src/commit/?id=c66f901b8e4101435a1671fb943031198361beb1 commit c66f901b8e4101435a1671fb943031198361beb1 Author: Toomas Soome AuthorDate: 2024-10-03 11:54:11 +0000 Commit: Toomas Soome CommitDate: 2024-10-10 12:55:03 +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. (cherry picked from commit 79a0d14fa05c75038caa52099289effb85732f88) --- 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 06215b1ab0fd..6f7b207ff404 100644 --- a/stand/libsa/dosfs.c +++ b/stand/libsa/dosfs.c @@ -816,7 +816,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)