From nobody Sat Oct 28 21:15:01 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 4SHskF2mPdz4y35H; Sat, 28 Oct 2023 21:15: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SHskF2H4hz4TFl; Sat, 28 Oct 2023 21:15:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698527701; 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=DupY1EfyTwFGvE2dRATduGXmJ+MyWLBGvxnY+u/OILE=; b=pzPhL9ZMtQxcV7kiDJHwxcKTnPr54lx1W7G46pwqoWuZ86FMGdGNxIOGDO6BixG5GquM+o L0nz+QmeFhhjCe13JFPLnSwLlpFKWRUze0axpRq+h05BjoJc0vxSKUvOKoKqG1ztmdi54+ Jko0KzBnNrmkAEJeQaADbd2iAffjKXnwHM+dfXou3m+va7/HUjNJocJWFjJoGOwtCoyqe+ VQQkb/w1TdYAn8R50wHO2i8zKGjGtppKPSFAOjmhhsGahYJLl8Q5Z7lIkS0wSdkaMLkv5V ktqoUJXK+mkD1br4lGlbkzA4eR6c+l/Fz6OyiMM0QVFkBbWveUqAYtigwHYoeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698527701; 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=DupY1EfyTwFGvE2dRATduGXmJ+MyWLBGvxnY+u/OILE=; b=cJNH3oFqhXHiGZOeSby7DsWBWIoXCnhtDi3xAFp/1tqUjGznr9VCn1Ydw7MKv+sacLN6pu dktbbPHrXtcrCLrDFbE24n35NOT71/XqT6AIdB4vong7yzmrEpTJTKwVKri96x/UCwfPXn AlWNw44XusIKeLlBGjh9VjOgLia6XlE4QmzPe44D69Gbn5sWSR/pJyfK3ax8ngYbc0Yrr2 nGyX9XPUJF5q7c2cwVq13UIvXCtcTrtkANHCILVaLN3rH5+k0eiXzgQWxZ0TRCskGMfdOq DtIGekiZflV6PgwqWtCVMO4BWpCqpV6I96t8w6t8jirwz7Myu6MPyDIkkqVfAA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698527701; a=rsa-sha256; cv=none; b=T+EbCr3y9evhNpS9WhM4FG1VQsDi79t6B2MxrOEhblVdecMs+RBe+1Bk+vMdJY5OLb1qnN L9OPuCDlIM74g8EE2SO7JFAe3j2LnASR9TFc45okMLNCoGPtv+cSCk9bCtsWY6+tHSmsIo xCxiiJ4BReai2kJpxUrOqxJLDFyHW5UAhVaWej/8lNkXVTBPHn76q7KXgA4MXXY8Jji3zO /DEVXI8z+eiDLw0eZ38tp4By0KxNTYxI7NIkODIMf4zJRoxVpS00kit9XI2ih+AE9HvHxU 6rrl6bse16yNLY5Fe08Wyao61YjzhqChUWuya2KJSBPZUpkE0/KcwXry5SIOzA== 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 4SHskF1M1Dz19tv; Sat, 28 Oct 2023 21:15:01 +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 39SLF1bc061051; Sat, 28 Oct 2023 21:15:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39SLF1fs061048; Sat, 28 Oct 2023 21:15:01 GMT (envelope-from git) Date: Sat, 28 Oct 2023 21:15:01 GMT Message-Id: <202310282115.39SLF1fs061048@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: b08c5c8acf1e - stable/13 - 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/13 X-Git-Reftype: branch X-Git-Commit: b08c5c8acf1e85bd719cc1f65a304948ae39bc4f Auto-Submitted: auto-generated The branch stable/13 has been updated by mckusick: URL: https://cgit.FreeBSD.org/src/commit/?id=b08c5c8acf1e85bd719cc1f65a304948ae39bc4f commit b08c5c8acf1e85bd719cc1f65a304948ae39bc4f Author: Kirk McKusick AuthorDate: 2023-10-20 22:14:46 +0000 Commit: Kirk McKusick CommitDate: 2023-10-28 21:14:32 +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 d33311c79250..4584456d8a64 100644 --- a/sbin/fsck_ffs/setup.c +++ b/sbin/fsck_ffs/setup.c @@ -318,6 +318,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