From nobody Mon May 08 09:45:10 2023 X-Original-To: bugs@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 4QFGc70xh6z49g2v for ; Mon, 8 May 2023 09:45:11 +0000 (UTC) (envelope-from bugzilla-noreply@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 4QFGc64br3z3yfZ for ; Mon, 8 May 2023 09:45:10 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683539110; 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=9KDNf3tTGRMRwiiDtHjBMg+Zum10aEbWeCsrI7jnM2k=; b=cSAIvePkotRhja7QDxPJZr4RdBa/sAQMrPfnE2mayrSGU4HcTXWZwi5HcSjQ9SIKzrBu2m zBTYYgAJNiJKuVzdLFFqVXJJwoAMLKwGoqAPLFpxy/kRnrZHdg5VUHyL/xTtFdX9iUmoaV oiwULuqMfeend/eYqXEmQ07vy/WOeOdlsNzZkHInbTIOAgauinMkn3uHuNYMsfBpWf6VYi zStuY4FFIOlszpJ4FFSVD7l8AqzTGE534HOYAqXwvZ/hZRLOzOoKHcW2Qs4bfJdv+p+HmO c2g8VQ+jHIBnXTe4VU2fGpM2MKROKEwKgDlzBKmwq1s8Rv36ZijuLqRtnUiddQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683539110; a=rsa-sha256; cv=none; b=L/cQKXBOLlOH98BlbMvM2ictOvMKd1ELal4M5qOkAzK7Hxj9eONECLARCMkd2GjNIsBxJL C900OFt6pZC0bxf85R+ZkI78fEZio8a8Wb7sVViNbc57x7MU/0mm5JPfJeDWcUl23Pcxy0 X20Ge3/XkB2Gi03wyfLSrK5krc+n676lNG9QiwxNT5kcjpD4BRbNuf8GzWZChVB/83aDyH xFiNuvOSlQ6my1PauJlzz6WIqOGUByBaYe/dWmUvEHHR/H1Tx6prKUfvm4HLHUUUZIzeP/ C40yZUrYKrmLwF7iqMRBZdy/BiyrtpFZxkUGmRUAggLrl+LBOgadByysJBlG5g== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (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 4QFGc63gcFzwBZ for ; Mon, 8 May 2023 09:45:10 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 3489jAUP062733 for ; Mon, 8 May 2023 09:45:10 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 3489jAaU062732 for bugs@FreeBSD.org; Mon, 8 May 2023 09:45:10 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 271312] inum > maxino should probably be inum >= maxino in fsck_ffs Date: Mon, 08 May 2023 09:45:10 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: rtm@lcs.mit.edu X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D271312 Bug ID: 271312 Summary: inum > maxino should probably be inum >=3D maxino in fsck_ffs Product: Base System Version: CURRENT Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: rtm@lcs.mit.edu Created attachment 242053 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D242053&action= =3Dedit broken file system image that causes fsck to crash due to off-by-one maxino check fsck_ffs has some checks for an out-of-range i-number that say "... > maxino" which I think should be >=3D. One consequence is that inoinfo() in fsutil.c can index beyond the end of inostathead[]: if (inum > maxino) errx(EEXIT, "inoinfo: inumber %ju out of range", (uintmax_t)inum); ilp =3D &inostathead[inum / sblock.fs_ipg]; A backtrace from fsck_ffs -y on the attached file-system image: Program received signal SIGBUS, Bus error. Object-specific hardware error. 0x000000000021f051 in pass2check (idesc=3D0x7fffffffe7b8) at pass2.c:486 486 switch (inoinfo(dirp->d_ino)->ino_state) { (gdb) where #0 0x000000000021f051 in pass2check (idesc=3D0x7fffffffe7b8) at pass2.c:486 #1 0x00000000002093e7 in dirscan (idesc=3D0x7fffffffe7b8) at dir.c:211 #2 0x000000000021318b in ckinode (dp=3D0x7fffffffe6b8, idesc=3D0x7fffffffe= 7b8) at inode.c:126 #3 0x000000000021e130 in pass2 () at pass2.c:202 #4 0x0000000000219a7d in checkfilesys (filesys=3D0x7fffffffed79 "junk") at main.c:468 #5 0x0000000000218f42 in main (argc=3D1, argv=3D0x7fffffffea28) at main.c:= 210 --=20 You are receiving this mail because: You are the assignee for the bug.=