From nobody Thu Oct 10 12:54:01 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 4XPV7Y2m89z5Z1BC; Thu, 10 Oct 2024 12:54:01 +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 4XPV7Y2B6sz4R8P; Thu, 10 Oct 2024 12:54:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728564841; 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=UlZ+BV+SQ8A9mh3I0qB5D4iuvL0Ol09nEdB9O0J0sf8=; b=Re3aCyuHBNqUDjIlM2PVJvTAHQO4OzXdDLRkCY1wlLnt8Qp/2UXnMmmhGgj1e2R7XHX0JA KzVmILRmZXrIBky/gP6oCk1xfa5f3GtvhE+y9+3dpqawkdgI+s7w28r6eDei9a+JebWCIL ztZiUrcchlTdZKcH9NDjlWwstvjukdb4n5YDjl64Rw0zBs0fxX0aH8UzJGz8qxy1YB3s3a oiMifcqS5i4HjVEEdYmXY14fDB237xxDYcurALkY6CZXvXMfTFadlYNq5ozadXULROh2FZ Fs+Cub7oMKGxT6p7o5E+avXAVXh+StEETVABDdCWf2Ur0DKtomxJobaadhYM6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728564841; 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=UlZ+BV+SQ8A9mh3I0qB5D4iuvL0Ol09nEdB9O0J0sf8=; b=l38Mporq+i6pOL6AS4QI8h6FFoskHq7ZrZUHBDAqRUlaQdkV1rmliG6X4Q4R0ud2yQmp3u LboAUmM6Bk29V/Hax/zvxVznq6pWbeq77UJWLIvjGBex+44HEKCy6/4oCm9q3oXdElppX5 MYO6EjReJ6ymRXdzM2Qt2aZ2t+NrJ6ui5jcFJA+FywkySmh1K57uoFIEdP47lcE7Lwu7hV /eQ4upE6hjLNqmAz4FaJMv+q81NqCy1p/ctNjBs/YjLyVau1QpjM+/QHLpOLuHCUNqzq08 5ryxBZHUvuQyxFUHP/7LvsvK3JUalvNhPWdILpLyVaV+y7V8fP1AiscWYfRuiQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728564841; a=rsa-sha256; cv=none; b=ozVeMdz6HZrZgG+evVdRq5LxAX+jkeLi/gpSvxILGZ9Fy91NORP2ufPnW486ogJanfnjZW gEhdsqrReFZPZV3kZhYLdaRW/FfRYOZJtMpXydO1gM3BAUrNEhw+kvf3RVIw63mbVdiNcO XXPyzPeng6LdiQEe/D/YFu5a6O4YlZ14EvuwKEFWqXinD+nk4Yj9OXV6E25MGNSRUrRI8j re0r5oCxkNoFlZDiUwy5lOoFAsttALbAMlgzrOyjAe8GuQqLc4ghFhAksjoJP63G1Ezom+ GOeyStAx7xax5S4cjRqFgRTHaSM0UL6xUXhMqoENA2IO9de8Juf+6SIct9+X2Q== 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 4XPV7Y1nB8zyFq; Thu, 10 Oct 2024 12:54:01 +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 49ACs1CR040536; Thu, 10 Oct 2024 12:54:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49ACs184040533; Thu, 10 Oct 2024 12:54:01 GMT (envelope-from git) Date: Thu, 10 Oct 2024 12:54:01 GMT Message-Id: <202410101254.49ACs184040533@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: f37dc94abcae - stable/14 - 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/14 X-Git-Reftype: branch X-Git-Commit: f37dc94abcaedc31421f5433b23522fe2ee1506b Auto-Submitted: auto-generated The branch stable/14 has been updated by tsoome: URL: https://cgit.FreeBSD.org/src/commit/?id=f37dc94abcaedc31421f5433b23522fe2ee1506b commit f37dc94abcaedc31421f5433b23522fe2ee1506b Author: Toomas Soome AuthorDate: 2024-10-03 11:54:11 +0000 Commit: Toomas Soome CommitDate: 2024-10-10 12:52:50 +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 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)