mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-16 13:34:30 +00:00
fs/ntfs3: Fix oob in ntfs_listxattr
The length of name cannot exceed the space occupied by ea. Reported-and-tested-by: syzbot+65e940cfb8f99a97aca7@syzkaller.appspotmail.com Signed-off-by: Edward Adam Davis <eadavis@qq.com> Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
This commit is contained in:
parent
b2dd7b953c
commit
731ab1f982
@ -219,6 +219,9 @@ static ssize_t ntfs_list_ea(struct ntfs_inode *ni, char *buffer,
|
|||||||
if (!ea->name_len)
|
if (!ea->name_len)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
if (ea->name_len > ea_size)
|
||||||
|
break;
|
||||||
|
|
||||||
if (buffer) {
|
if (buffer) {
|
||||||
/* Check if we can use field ea->name */
|
/* Check if we can use field ea->name */
|
||||||
if (off + ea_size > size)
|
if (off + ea_size > size)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user