From nobody Sat Oct 28 21:11:11 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 4SHsdq49ZNz4y2pK; Sat, 28 Oct 2023 21:11:11 +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 4SHsdq2TsSz4SWY; Sat, 28 Oct 2023 21:11:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698527471; 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=5k1rmCHHZLM2kUerXudgxyPjqgA6rR5XCJXf2VJCXCU=; b=BxuZyTA73Wnf3Q6stCoe2el+FR/MQ6LOCw1fw9XMJTgKirtiu5SG8Y9tWTq7rKF+UYYSH0 rIJ12CekT7066JHWwsChFqA64/QfHaGy5p+YpoBB+FjdVfJFB/K9HGIjm4R2p4eTXO1K0y mDDxRM0VAxn2UAMIsNs8krA1NF2qdRfOfM3A2jniAtIJRqIPRoqdmBoeK5AttNR8YElmtZ Xbt0wjfbF7zrUwBPP/l/X/uSSsNiokmF7FE5aEF6cmT7VZ6+jPYpFlSRmEHHtW/qNUV606 yVtFnhGriH93DiHdIRPfDPKRFNWUYpyItT1BnGelJx6b0x5yNnotZoWpsd92gQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698527471; 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=5k1rmCHHZLM2kUerXudgxyPjqgA6rR5XCJXf2VJCXCU=; b=m9NAYTtRQZjlgsYg1ueOA9PDZGXJts4rG1bmFmknK6GDtuMaC4DI6Dh+LO1uBlmPnsQNyS HLwaPdLIy1//NezaJe17VSkT8g4e9Pzy4nH8IeISvqylHRpjR70ZUCTm9D2pHvyyNW7+IH xmmbTC7qAJn0fu1e6lZBlFSo7dfd8sGsohBv0C3Ba8OeSYlFUgs22CjF1TPzhL9y0FqGVa DTsUjIOyJ+OoVKmXSRTdLLCW7yuMP+SrrA7YorVoGFPWtb9c2Y+0yGvBTZoYQaZLLeZEIm mf4R1nXbfZBfX01DM5CCFHoMvJ8KsJh3IuDznKKwjlo1mnR4X2h72t0VNltOxA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698527471; a=rsa-sha256; cv=none; b=r/flbr7e49tiu+AdZcEzVgUbJSg0qutC9yW2KwnyA2f6MTO78cd5B8wFlcUXPNb6iOIbj9 gQ6Xojv/v5PxFdnuCr/bvD60/RlYmBdVEXofj0V9XSwpoxiPPD/jBL/UnsyfqBuTqkBtfV FjzDlbY1zpA0hfJqjHmseSysi1z4rmJb2B3BhZLPg2HiRBFJ5dDHgi+zVGah0wksDRJz8w pVG6ApeAVl2Aof1BJyrFl6+JaEf5t7mdTy7Q7fAvXFFbXR3r0FvDUp8MpIRVtxivDi5hJ/ e3jCKQ8Cau7esS5bPvydHzwYosY1jqS14plF9dnfTfl8RbBeADbtig16Pib/8Q== 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 4SHsdq1YXqz1BJS; Sat, 28 Oct 2023 21:11:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39SLBB06055583; Sat, 28 Oct 2023 21:11:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39SLBB8X055580; Sat, 28 Oct 2023 21:11:11 GMT (envelope-from git) Date: Sat, 28 Oct 2023 21:11:11 GMT Message-Id: <202310282111.39SLBB8X055580@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: 0bd8274c8529 - stable/14 - Fix a bug in fsck_ffs(8) triggered by corrupted filesystems. 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/14 X-Git-Reftype: branch X-Git-Commit: 0bd8274c8529145fb1cba77b538291545cd34c39 Auto-Submitted: auto-generated The branch stable/14 has been updated by mckusick: URL: https://cgit.FreeBSD.org/src/commit/?id=0bd8274c8529145fb1cba77b538291545cd34c39 commit 0bd8274c8529145fb1cba77b538291545cd34c39 Author: Kirk McKusick AuthorDate: 2023-10-20 22:14:46 +0000 Commit: Kirk McKusick CommitDate: 2023-10-28 21:09:36 +0000 Fix a bug in fsck_ffs(8) triggered by corrupted filesystems. Reported-by: Andreas Bock PR: 274404 (cherry picked from commit 1e39a0886e0999520a7e7136e3f7d09e9cd9a5f2) --- sbin/fsck_ffs/setup.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sbin/fsck_ffs/setup.c b/sbin/fsck_ffs/setup.c index 49e89f9221b0..d1d09d07b43a 100644 --- a/sbin/fsck_ffs/setup.c +++ b/sbin/fsck_ffs/setup.c @@ -299,6 +299,8 @@ checksnapinfo(struct inode *snapip) size = fragroundup(fs, DIP(snapip->i_dp, di_size) - lblktosize(fs, lbn)); bp = getdatablk(idesc.id_parent, size, BT_DATA); + if (bp->b_errs != 0) + return (0); snapblklist = (daddr_t *)bp->b_un.b_buf; /* * snapblklist[0] is the size of the list