Skip to content

hpfs: fix extended attribute bounds checks and get_indirect_ea() overflow - #2629

Open
vfsci-bot[bot] wants to merge 1 commit into
vfs.base.cifrom
pw/1169475/vfs.base.ci
Open

vfsci-bot[bot] wants to merge 1 commit into
vfs.base.cifrom
pw/1169475/vfs.base.ci

Conversation

@vfsci-bot

@vfsci-bot vfsci-bot Bot commented Sep 20, 2026

Copy link
Copy Markdown

Series: https://patchwork.kernel.org/project/linux-fsdevel/list/?series=1169475
Submitter: Hui Peng
Version: 1
Patches: 1/1
Message-ID: <20260919222608.3795070-1-benquike@gmail.com>
Base: vfs.base.ci
Lore: https://lore.kernel.org/linux-fsdevel/20260919222608.3795070-1-benquike@gmail.com


Automated by ml2pr

…flow

Fix extended attribute parsing bugs in fs/hpfs/ea.c and fs/hpfs/map.c:

1. In get_indirect_ea(), reject negative or wrapping size values (such
   as size == 0xffffffff where size + 1 wraps to 0 and kmalloc(0)
   returns ZERO_SIZE_PTR).
2. In hpfs_ea_ext_remove(), hpfs_get_ea(), and hpfs_map_fnode(),
   validate EA entry sizes (`ea->namelen` and `ea_size(ea)`) against the
   buffer end and ensure `ea_size(ea) > 0` so malformed extended
   attributes cannot cause out-of-bounds reads or infinite loops.

Fixes: 1da177e ("Linux-2.6.12-rc2")
Assisted-by: LLM
Signed-off-by: Hui Peng <benquike@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant