Skip to content
Commit 02f51d45 authored by Tomas Bortoli's avatar Tomas Bortoli Committed by Linus Torvalds
Browse files

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

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>
parent e70cc2bd
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment