Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 09 Oct 2021 11:22:39 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 259024] ext2_search_dirblock() loops forever if e2d_reclen is zero
Message-ID:  <bug-259024-227@https.bugs.freebsd.org/bugzilla/>

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

            Bug ID: 259024
           Summary: ext2_search_dirblock() loops forever if e2d_reclen is
                    zero
           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 228539
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D228539&action=
=3Dedit
An ext3 disk image that causes ext2_search_dirblock() to loop forever.

The code in ext2_search_dirblock() that handles e2d_reclen =3D=3D 0
doesn't increment ep, and thus loops forever.=20

I've attached a demo:

% gunzip ext34.img.gz
% sudo mdconfig -f ext34.img
% sudo mount -t ext2fs -o ro /dev/md0 /mnt
% sudo cp /mnt/a /dev/null
<the lookup never finishes>

FreeBSD unmatched 14.0-CURRENT FreeBSD 14.0-CURRENT #0
main-n249571-b5f90655ea3: Thu Sep 23 06:10:05 UTC 2021=20=20=20=20
root@releng1.nyi.freebsd.org:/usr/obj/usr/src/riscv.riscv64/sys/GENERIC  ri=
scv

--=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-259024-227>