diff options
| author | Christoph Hellwig <hch@lst.de> | 2020-07-10 10:57:22 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-08-21 10:52:56 +0200 |
| commit | d20fc4079f20f87fe6bda8b3dc0ac55e746346bb (patch) | |
| tree | 9fc7dfb992a0ad45bd12d012e1ec3709f5f486ba /include/linux/debugobjects.h | |
| parent | 1c9f9125892a43901438bf704ada6b7019e2a884 (diff) | |
net/9p: validate fds in p9_fd_open
[ Upstream commit a39c46067c845a8a2d7144836e9468b7f072343e ]
p9_fd_open just fgets file descriptors passed in from userspace, but
doesn't verify that they are valid for read or writing. This gets
cought down in the VFS when actually attempting a read or write, but
a new warning added in linux-next upsets syzcaller.
Fix this by just verifying the fds early on.
Link: http://lkml.kernel.org/r/20200710085722.435850-1-hch@lst.de
Reported-by: syzbot+e6f77e16ff68b2434a2c@syzkaller.appspotmail.com
Signed-off-by: Christoph Hellwig <hch@lst.de>
[Dominique: amend goto as per Doug Nazar's review]
Signed-off-by: Dominique Martinet <asmadeus@codewreck.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include/linux/debugobjects.h')
0 files changed, 0 insertions, 0 deletions
