f2fs: explicitly null-terminate the xattr list
authorEric Biggers <ebiggers@google.com>
Tue, 7 Nov 2023 04:44:34 +0000 (20:44 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 20 Jan 2024 10:51:37 +0000 (11:51 +0100)
commit2525d1ba225b5c167162fa344013c408e8b4de36
treee34163200f26af277d3a8188f21421f59dc8b273
parent47345b4264bc394a8d16bb16e8e7744965fa3934
f2fs: explicitly null-terminate the xattr list

commit e26b6d39270f5eab0087453d9b544189a38c8564 upstream.

When setting an xattr, explicitly null-terminate the xattr list.  This
eliminates the fragile assumption that the unused xattr space is always
zeroed.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/f2fs/xattr.c