Skip to content

proc: use strnlen() for name validation in __proc_create#1237

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

proc: use strnlen() for name validation in __proc_create#1237
vfsci-bot[bot] wants to merge 1 commit intovfs.base.cifrom
pw/1083831/vfs.base.ci

Conversation

@vfsci-bot
Copy link
Copy Markdown

@vfsci-bot vfsci-bot Bot commented Apr 21, 2026

Series: https://patchwork.kernel.org/project/linux-fsdevel/list/?series=1083831
Submitter: Thorsten Blum
Version: 1
Patches: 1/1
Message-ID: <20260421122648.56723-2-thorsten.blum@linux.dev>
Base: vfs.base.ci
Lore: https://lore.kernel.org/linux-fsdevel/20260421122648.56723-2-thorsten.blum@linux.dev


Automated by ml2pr

Replace strlen(fn) with strnlen(fn, NAME_MAX + 1) when validating the
final path component in __proc_create().

This preserves the existing name limit while bounding the length scan to
one byte past the maximum name length. Handle empty names separately,
and treat names longer than NAME_MAX as too long.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Reviewed-by: Jan Kara <jack@suse.cz>
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