• Alden Tondettar's avatar
    udf: Prevent stack overflow on corrupted filesystem mount · a47241cd
    Alden Tondettar authored
    Presently, a corrupted or malicious UDF filesystem containing a very large
    number (or cycle) of Logical Volume Integrity Descriptor extent
    indirections may trigger a stack overflow and kernel panic in
    udf_load_logicalvolint() on mount.
    
    Replace the unnecessary recursion in udf_load_logicalvolint() with
    simple iteration. Set an arbitrary limit of 1000 indirections (which would
    have almost certainly overflowed the stack without this fix), and treat
    such cases as if there were no LVID.
    Signed-off-by: default avatarAlden Tondettar <alden.tondettar@gmail.com>
    Signed-off-by: default avatarJan Kara <jack@suse.cz>
    a47241cd
super.c 65.9 KB