android_kernel_oneplus_msm8998/fs/cifs
Steve French 5f3a3e86be cifs: do not allow creating sockets except with SMB1 posix exensions
commit 1d0cffa674cfa7d185a302c8c6850fc50b893bed upstream.

RHBZ: 1453123

Since at least the 3.10 kernel and likely a lot earlier we have
not been able to create unix domain sockets in a cifs share
when mounted using the SFU mount option (except when mounted
with the cifs unix extensions to Samba e.g.)
Trying to create a socket, for example using the af_unix command from
xfstests will cause :
BUG: unable to handle kernel NULL pointer dereference at 00000000
00000040

Since no one uses or depends on being able to create unix domains sockets
on a cifs share the easiest fix to stop this vulnerability is to simply
not allow creation of any other special files than char or block devices
when sfu is used.

Added update to Ronnie's patch to handle a tcon link leak, and
to address a buf leak noticed by Gustavo and Colin.

Acked-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
CC:  Colin Ian King <colin.king@canonical.com>
Reviewed-by: Pavel Shilovsky <pshilov@microsoft.com>
Reported-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: Steve French <smfrench@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-29 07:50:01 +02:00
..
asn1.c
cache.c
cifs_debug.c Display number of credits available 2016-10-28 03:01:32 -04:00
cifs_debug.h lib: update single-char callers of strtobool() 2016-10-28 03:01:30 -04:00
cifs_dfs_ref.c Fix that several functions handle incorrect value of mapchars 2015-05-10 19:56:35 -05:00
cifs_fs_sb.h fs/cifs: make share unaccessible at root level mountable 2016-08-20 18:09:20 +02:00
cifs_ioctl.h Add way to query server fs info for smb3 2015-08-20 10:19:25 -05:00
cifs_spnego.c KEYS: Merge the type-specific data with the payload data 2015-10-21 15:18:36 +01:00
cifs_spnego.h
cifs_unicode.c CIFS: add misssing SFM mapping for doublequote 2017-05-20 14:27:01 +02:00
cifs_unicode.h CIFS: add misssing SFM mapping for doublequote 2017-05-20 14:27:01 +02:00
cifs_uniupr.h
cifsacl.c KEYS: Merge the type-specific data with the payload data 2015-10-21 15:18:36 +01:00
cifsacl.h
cifsencrypt.c CIFS: zero sensitive data when freeing 2018-02-16 20:09:39 +01:00
cifsfs.c SMB3: GUIDs should be constructed as random but valid uuids 2016-10-28 03:01:32 -04:00
cifsfs.h Fix cifs_uniqueid_to_ino_t() function for s390x 2016-03-09 15:34:50 -08:00
cifsglob.h CIFS: Reconnect expired SMB sessions 2017-10-18 09:20:40 +02:00
cifspdu.h Add way to query server fs info for smb3 2015-08-20 10:19:25 -05:00
cifsproto.h CIFS: Fix a possible memory corruption during reconnect 2017-01-06 11:16:15 +01:00
cifssmb.c CIFS: Reconnect expired SMB sessions 2017-10-18 09:20:40 +02:00
connect.c CIFS: zero sensitive data when freeing 2018-02-16 20:09:39 +01:00
dir.c cifs: do not allow creating sockets except with SMB1 posix exensions 2018-04-29 07:50:01 +02:00
dns_resolve.c
dns_resolve.h
export.c
file.c CIFS: silence lockdep splat in cifs_relock_file() 2018-04-13 19:50:03 +02:00
fscache.c NFS client updates for Linux 3.13 2013-11-08 05:57:46 +09:00
fscache.h CIFS: FS-Cache: Uncache unread pages in cifs_readpages() before freeing them 2013-09-18 10:17:03 -05:00
inode.c fs/cifs: make share unaccessible at root level mountable 2016-08-20 18:09:20 +02:00
ioctl.c cifs: fix CIFS_IOC_GET_MNT_INFO oops 2017-05-20 14:27:01 +02:00
Kconfig Allow parsing vers=3.11 on cifs mount 2015-06-27 20:23:32 -07:00
link.c Merge branch 'for-linus-1' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2015-06-22 12:51:21 -07:00
Makefile cifs: add new case-insensitive conversion routines that are based on wchar_t's 2013-09-08 14:38:05 -05:00
misc.c CIFS: zero sensitive data when freeing 2018-02-16 20:09:39 +01:00
netmisc.c cifs: small underflow in cnvrtDosUnixTm() 2018-03-24 10:58:46 +01:00
nterr.c
nterr.h
ntlmssp.h cifs: dynamic allocation of ntlmssp blob 2016-07-27 09:47:39 -07:00
readdir.c cifs: initialize file_info_lock 2017-02-09 08:02:45 +01:00
rfc1002pdu.h
sess.c CIFS: Enable encryption during session setup phase 2018-03-24 10:58:40 +01:00
smb1ops.c CIFS: Improve readdir verbosity 2017-06-29 12:48:51 +02:00
smb2file.c CIFS: Fix a possible memory corruption in push locks 2017-01-06 11:16:16 +01:00
smb2glob.h cifs: Limit the overall credit acquired 2016-10-28 03:01:32 -04:00
smb2inode.c Do not send SMB3 SET_INFO request if nothing is changing 2016-10-28 03:01:33 -04:00
smb2maperror.c Fix problem recognizing symlinks 2014-10-02 14:10:04 -05:00
smb2misc.c Handle mismatched open calls 2017-05-08 07:46:01 +02:00
smb2ops.c CIFS: Reconnect expired SMB sessions 2017-10-18 09:20:40 +02:00
smb2pdu.c SMB2: Fix share type handling 2018-04-13 19:50:04 +02:00
smb2pdu.h CIFS: Fix maximum SMB2 header size 2017-09-07 08:34:09 +02:00
smb2proto.h Handle mismatched open calls 2017-05-08 07:46:01 +02:00
smb2status.h
smb2transport.c Handle mismatched open calls 2017-05-08 07:46:01 +02:00
smbencrypt.c cifs: use memzero_explicit to clear stack buffer 2015-01-19 15:32:13 -06:00
smberr.h
smbfsctl.h [SMB3] Send durable handle v2 contexts when use of persistent handles required 2015-11-03 09:26:27 -06:00
transport.c Handle mismatched open calls 2017-05-08 07:46:01 +02:00
winucase.c [CIFS] quiet sparse compile warning 2013-09-08 14:54:24 -05:00
xattr.c VFS: normal filesystems (and lustre): d_inode() annotations 2015-04-15 15:06:57 -04:00