Skip to content
Commit 00235ab8 authored by Tomas Bortoli's avatar Tomas Bortoli Committed by Greg Kroah-Hartman
Browse files

autofs: fix slab out of bounds read in getname_kernel()

commit 02f51d45 upstream.

The autofs subsystem does not check that the "path" parameter is present
for all cases where it is required when it is passed in via the "param"
struct.

In particular it isn't checked for the AUTOFS_DEV_IOCTL_OPENMOUNT_CMD
ioctl command.

To solve it, modify validate_dev_ioctl(function to check that a path has
been provided for ioctl commands that require it.

Link: http://lkml.kernel.org/r/153060031527.26631.18306637892746301555.stgit@pluto.themaw.net


Signed-off-by: default avatarTomas Bortoli <tomasbortoli@gmail.com>
Signed-off-by: default avatarIan Kent <raven@themaw.net>
Reported-by: default avatar <syzbot+60c837b428dc84e83a93@syzkaller.appspotmail.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 30a7a7b0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment