Date: Sun, 28 May 2023 00:13:49 +0000 From: bugzilla-noreply@freebsd.org To: fs@FreeBSD.org Subject: [Bug 271378] negative jt_size in ffs truncate journal record causes fsck to crash Message-ID: <bug-271378-3630-0r7puoByvZ@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-271378-3630@https.bugs.freebsd.org/bugzilla/>
index | next in thread | previous in thread | raw e-mail
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=271378 --- Comment #1 from commit-hook@FreeBSD.org --- A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=101a9ac07128a17d8797cc3e93978d2cfa457e99 commit 101a9ac07128a17d8797cc3e93978d2cfa457e99 Author: Kirk McKusick <mckusick@FreeBSD.org> AuthorDate: 2023-05-28 00:09:02 +0000 Commit: Kirk McKusick <mckusick@FreeBSD.org> CommitDate: 2023-05-28 00:12:30 +0000 Fix a bug in fsck_ffs(8) triggered by corrupted filesystems. Check for valid file size before processing journal entries for it. Done by extracting the file size check from pass1.c into chkfilesize() then using it in the journal code in suj.c Reported-by: Robert Morris PR: 271378 MFC-after: 1 week Sponsored-by: The FreeBSD Foundation sbin/fsck_ffs/fsck.h | 1 + sbin/fsck_ffs/fsutil.c | 25 +++++++++++++++++++++++++ sbin/fsck_ffs/pass1.c | 12 +----------- sbin/fsck_ffs/suj.c | 3 +++ 4 files changed, 30 insertions(+), 11 deletions(-) -- You are receiving this mail because: You are the assignee for the bug.help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-271378-3630-0r7puoByvZ>
