git: stand/cd9660: handle padding after advancing the record pointer

Aaron LI aly at crater.dragonflybsd.org
Sun Oct 11 07:02:28 PDT 2026


commit 3693004f6e5638a44f257bce90b5d3b0bc5841be
Author: David Bidner <david at crap.solutions>
Date:   Sun Oct 11 08:22:50 2026 +0200

    stand/cd9660: handle padding after advancing the record pointer
    
    cd9660_open() walks a CD9660 directory by moving dp to the next record
    and then adding the record length to the byte counter off.  dp has
    already moved, so off gets the next record's length, not the current
    one.  At the end of a directory this can leave off block-aligned after
    the last real record, so the loop reads one sector past the directory
    extent before it can observe the zero padding.  The following sector can
    be the start of another file; parsing its bytes as a directory record
    can make the Rock Ridge/SUSP scanner loop without making progress and
    hang the loader before the kernel.
    
    Follow the FreeBSD fix from D8101 and handle padding immediately after
    the advance: if the new record has zero length it is padding, so resync
    off to the block boundary and continue.  Otherwise add the new record
    length.
    
    Obtained-from: FreeBSD (review: https://reviews.freebsd.org/D8101)
    Bug: https://bugs.dragonflybsd.org/issues/3446

Summary of changes:
 stand/lib/cd9660.c | 6 ++++++
 1 file changed, 6 insertions(+)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/3693004f6e5638a44f257bce90b5d3b0bc5841be


-- 
DragonFly BSD source repository


More information about the Commits mailing list