]> www.infradead.org Git - users/jedix/linux-maple.git/commit
CIFS: fix type confusion in copy offload ioctl
authorJann Horn <jann@thejh.net>
Fri, 11 Sep 2015 14:27:27 +0000 (16:27 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 29 Sep 2015 17:26:06 +0000 (19:26 +0200)
commitc1589311c9e46c84aea04546b65be12481db8d81
treeab8bc62053399a3ca0afaadc45b8c17ca8081146
parentf5a73e9c4a1c5dc9f1d90abf782c5f9ac694e443
CIFS: fix type confusion in copy offload ioctl

commit 4c17a6d56bb0cad3066a714e94f7185a24b40f49 upstream.

This might lead to local privilege escalation (code execution as
kernel) for systems where the following conditions are met:

 - CONFIG_CIFS_SMB2 and CONFIG_CIFS_POSIX are enabled
 - a cifs filesystem is mounted where:
  - the mount option "vers" was used and set to a value >=2.0
  - the attacker has write access to at least one file on the filesystem

To attack this, an attacker would have to guess the target_tcon
pointer (but guessing wrong doesn't cause a crash, it just returns an
error code) and win a narrow race.

Signed-off-by: Jann Horn <jann@thejh.net>
Signed-off-by: Steve French <smfrench@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/cifs/ioctl.c