Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Oct 2021 12:04:02 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 259068] ext2fs can violate some INVARIANTS if file system is damaged
Message-ID:  <bug-259068-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D259068

            Bug ID: 259068
           Summary: ext2fs can violate some INVARIANTS if file system is
                    damaged
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: rtm@lcs.mit.edu

Created attachment 228583
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D228583&action=
=3Dedit
A damaged ext3 disk image that causes INVARIANT failures.

I've attached a damaged ext3 file system that trips
over two INVARIANTS in CURRENT:

  VNASSERT failed: vp->v_type !=3D VNON not true at
/usr/src/sys/kern/vfs_cache.c:2404 (cache_enter_time)

  panic: Assertion dvp !=3D *vpp failed at /usr/src/sys/kern/vfs_cache.c:20=
84

The first is caused by a directory entry that refers to an
un-allocated inode; ext2_lookup_ino() calls cache_enter()
regardless. The second is caused by a directory entry
with i-number 2 but which is named neither . nor ..; perhaps
ext2_dirbadentry() or ext2_search_dirblock() should filter
these out.

To see a panic on a CURRENT system with INVARIANTS:
# uname -a
FreeBSD stock14 14.0-CURRENT FreeBSD 14.0-CURRENT #0 main-n248636-d20e9e02d=
b3:
Thu Aug 12 05:47:18 UTC 2021=20=20=20=20
root@releng1.nyi.freebsd.org:/usr/obj/usr/src/amd64.amd64/sys/GENERIC  amd64
# gunzip ext36.img.gz=20
# mdconfig -f ext36.img=20
md0
# mount -t ext2fs -o ro /dev/md0 /mnt
# ls -l /mnt
VNASSERT failed: vp->v_type !=3D VNON not true at
/usr/src/sys/kern/vfs_cache.c:2402 (cache_enter_time)

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-259068-227>