]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit - fs/f2fs/xattr.c
f2fs: fix to avoid memory leakage in f2fs_listxattr
authorRandall Huang <huangrandall@google.com>
Fri, 18 Oct 2019 06:56:22 +0000 (14:56 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Tue, 22 Oct 2019 17:32:42 +0000 (10:32 -0700)
commit688078e7f36c293dae25b338ddc9e0a2790f6e06
treebfdb73e559a913582cbd3eb33656710c403645cf
parent9f701f6c772b15461843b92f9b41a0705e190a86
f2fs: fix to avoid memory leakage in f2fs_listxattr

In f2fs_listxattr, there is no boundary check before
memcpy e_name to buffer.
If the e_name_len is corrupted,
unexpected memory contents may be returned to the buffer.

Signed-off-by: Randall Huang <huangrandall@google.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/xattr.c