Skip to content
Commit 4378be89 authored by Kees Cook's avatar Kees Cook Committed by Greg Kroah-Hartman
Browse files

ext4: use memtostr_pad() for s_volume_name



commit be27cd64461c45a6088a91a04eba5cd44e1767ef upstream.

As with the other strings in struct ext4_super_block, s_volume_name is
not NUL terminated. The other strings were marked in commit 072ebb3b
("ext4: add nonstring annotations to ext4.h"). Using strscpy() isn't
the right replacement for strncpy(); it should use memtostr_pad()
instead.

Reported-by: default avatar <syzbot+50835f73143cc2905b9e@syzkaller.appspotmail.com>
Closes: https://lore.kernel.org/all/00000000000019f4c00619192c05@google.com/


Fixes: 744a5638 ("ext4: replace deprecated strncpy with alternatives")
Signed-off-by: default avatarKees Cook <keescook@chromium.org>
Link: https://patch.msgid.link/20240523225408.work.904-kees@kernel.org


Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0c383648
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment