mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-01 10:45:49 +00:00
ovl: fix file leak in ovl_real_fdget_meta()
ovl_open_realfile() is wrongly called twice after conversion to
new struct fd.
Fixes: 88a2f6468d
("struct fd: representation change")
Reported-by: syzbot+d9efec94dcbfa0de1c07@syzkaller.appspotmail.com
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
34e1a5d43c
commit
0c33037c82
@ -117,7 +117,7 @@ static int ovl_real_fdget_meta(const struct file *file, struct fd *real,
|
||||
struct file *f = ovl_open_realfile(file, &realpath);
|
||||
if (IS_ERR(f))
|
||||
return PTR_ERR(f);
|
||||
real->word = (unsigned long)ovl_open_realfile(file, &realpath) | FDPUT_FPUT;
|
||||
real->word = (unsigned long)f | FDPUT_FPUT;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user