Repository navigation
isofs: Fix handling of directories with small logical blocks - #2822
Open
vfsci-bot[bot] wants to merge 1 commit into
Open
vfsci-bot[bot] wants to merge 1 commit into
vfsci-bot[bot] wants to merge 1 commit into
Conversation
Commit b2eb2e2 ("isofs: Drop support of directory entries straddling blocks") made do_isofs_readdir() and isofs_find_entry() reject a directory record that does not end in the block it begins in. However, the block is the logical block of the volume, which can be 512 or 1024 bytes. ECMA-119 only requires a record to end in the 2048-byte logical sector in which it begins, so a record can cross a logical block. As of now, ls stops at the first such record and the files after it cannot be opened. The issue can be reproduced with an image that has 1024-byte logical blocks and 40 files in its root directory: mount -t iso9660 -o loop,ro lbs1024.iso /mnt ls /mnt | wc -l Before commit b2eb2e2 ("isofs: Drop support of directory entries straddling blocks"), the result is 40. After that commit, the result is 19, and the kernel logs: iso9660: Corrupted directory entry in block 0 of inode 1152 This patch will put such a record together from its two blocks again, but only when it ends in the logical sector in which it begins. Fixes: b2eb2e2 ("isofs: Drop support of directory entries straddling blocks") Signed-off-by: Hengyu Liang <hengyul@cs.unc.edu>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Series: https://patchwork.kernel.org/project/linux-fsdevel/list/?series=1183065
Submitter: Hengyu Liang
Version: 1
Patches: 1/1
Message-ID:
<20261010175649.700233-1-hengyul@cs.unc.edu>Base: vfs.base.ci
Lore: https://lore.kernel.org/linux-fsdevel/20261010175649.700233-1-hengyul@cs.unc.edu
Automated by ml2pr