From nobody Fri May 26 21:38:07 2023 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 4QSdZS3qMSz4TJ3N; Fri, 26 May 2023 21:38:08 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QSdZS35Lmz3M6k; Fri, 26 May 2023 21:38:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685137088; 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=w09RUKiWl+Tsy2VCT5nG9cdenDLQ8hyN9CCgMh8PreM=; b=igYKLj6hIMnzwWdLk+Rz1Se4OYs318DHbU4fFoFUB5U77kKDpT1uJgw+VvOppYPXIv2zki jCRGFndaGXNmV/UUrY8QnD6JsPYCpmqPO0McKGmDqxZtnzHLI3rSJ1QlXjjzb9fsRrhLpy +mTcmddgseE+PbW5M3GSE/PTQGd9Gk6JjtU336dRt0QtYZliSMlxw7U941mvC5cA1ghvkU xdWM5kk1fdyO4djzB2yQQCfwWXpCOECC6644Kr5iz6b9JqpowL8auEcnAhFuh5p8HU+6NQ AA3C1MnDdPm6k13dgwwS+64hjf9SKnpxLuByRi0u5uKuu9oSpodN7lQEzp3Tcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685137088; 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=w09RUKiWl+Tsy2VCT5nG9cdenDLQ8hyN9CCgMh8PreM=; b=qN65Jkkx07OSrGYS4w02lo6gkDnOroTrnTW+UNByM+hqehgtxwg4Q+WHu3O7WP7cv2QcLB lR9VEXxsV0fDMRfdSBzFyy3DqE+NaTJ830iWr165Ma7cegdvNwlFG+tV48atz6e09fHbF9 W9TyRYK2L2AYY2bPwvGLpconJ/i5hc5gOryZgRFq7PzJsMPMMbHc6OzrcP7yfI0VbJW+HR gA0LV/+QzWXLTMGDLe3X6/Gl/T9PopPuQuO+tVpXhIctF7+JnfZ3PURwrrtqi5dTjk3mDD hz8j8PiX3kaL6KfJwafewDNm7BwKekLJHFcnWW6SpfZ1BXuYQPwQAolgO2UgaA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1685137088; a=rsa-sha256; cv=none; b=RHEPHItRJkaQTaBEOGY1TDJkHBZ5P/9LksVdPN4BjWBuRVhyLKH3nU/69E2FSNFqkmyNkG 7kl2HSp9JDKSI245OGFtlaFqBlVSkWu7GRM7S+ZuvOYM7g5RPpyQ+hNmTl4Roe543jI+zz 3EetdMb8TdyLf+sVu5TGgrUpt93k3KTI+/QHk2zapy24zrazLvobJWs+pW4tP6aziTVf5r e8oVxLXg6g53+LZqB99mEBq9tt1T1z0zf0IGo8iw0118aHUZnvI89O6LMuWnZ9GoQWsk3R ACvl/OgMzTo3w6numywouwEzIzWQ2Rf9pvQbrX/IhEN4T2wTclEIV+n9lbJE5w== 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 4QSdZS0JrrzMlB; Fri, 26 May 2023 21:38:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 34QLc7rL045416; Fri, 26 May 2023 21:38:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 34QLc7gD045415; Fri, 26 May 2023 21:38:07 GMT (envelope-from git) Date: Fri, 26 May 2023 21:38:07 GMT Message-Id: <202305262138.34QLc7gD045415@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kirk McKusick Subject: git: b51ac373dd38 - stable/13 - Updates to UFS/FFS superblock integrity checks when reading a superblock. 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mckusick X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: b51ac373dd38f776b90d69f56652c2a9a6f165f8 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by mckusick: URL: https://cgit.FreeBSD.org/src/commit/?id=b51ac373dd38f776b90d69f56652c2a9a6f165f8 commit b51ac373dd38f776b90d69f56652c2a9a6f165f8 Author: Kirk McKusick AuthorDate: 2023-05-26 21:37:23 +0000 Commit: Kirk McKusick CommitDate: 2023-05-26 21:37:23 +0000 Updates to UFS/FFS superblock integrity checks when reading a superblock. Reinstall MFC commit 4660b60a00c as it has should now work correctly with fix for CGSIZE macro in MFC 4a3834e31fd. --- sys/ufs/ffs/ffs_subr.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/ufs/ffs/ffs_subr.c b/sys/ufs/ffs/ffs_subr.c index 1bd298315dd9..4ba452b05ec9 100644 --- a/sys/ufs/ffs/ffs_subr.c +++ b/sys/ufs/ffs/ffs_subr.c @@ -449,6 +449,7 @@ validate_sblock(struct fs *fs, int isaltsblk) CHK(fs->fs_old_cgoffset, <, 0, %jd); CHK2(fs->fs_old_cgoffset, >, 0, ~fs->fs_old_cgmask, <, 0, %jd); CHK(fs->fs_old_cgoffset * (~fs->fs_old_cgmask), >, fs->fs_fpg, %jd); + CHK(CGSIZE(fs), >, fs->fs_bsize, %jd); /* * If anything has failed up to this point, it is usafe to proceed * as checks below may divide by zero or make other fatal calculations.