mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-27 12:57:53 +00:00
fs/ntfs3: Fix oob in ntfs_listxattr
[ Upstream commit 731ab1f982
]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
ded8bf5b36
commit
52fff5799e
1 changed files with 3 additions and 0 deletions
|
@ -219,6 +219,9 @@ static ssize_t ntfs_list_ea(struct ntfs_inode *ni, char *buffer,
|
|||
if (!ea->name_len)
|
||||
break;
|
||||
|
||||
if (ea->name_len > ea_size)
|
||||
break;
|
||||
|
||||
if (buffer) {
|
||||
/* Check if we can use field ea->name */
|
||||
if (off + ea_size > size)
|
||||
|
|
Loading…
Reference in a new issue