android_kernel_oneplus_msm8998/fs/cifs
Roberto Bergantinos Corpas 336c166217 CIFS: cifs_read_allocate_pages: don't iterate through whole page array on ENOMEM
commit 31fad7d41e73731f05b8053d17078638cf850fa6 upstream.

 In cifs_read_allocate_pages, in case of ENOMEM, we go through
whole rdata->pages array but we have failed the allocation before
nr_pages, therefore we may end up calling put_page with NULL
pointer, causing oops

Signed-off-by: Roberto Bergantinos Corpas <rbergant@redhat.com>
Acked-by: Pavel Shilovsky <pshilov@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
CC: Stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-11 12:24:10 +02:00
..
asn1.c
cache.c
cifs_debug.c smb3: allow stats which track session and share reconnects to be reset 2018-11-21 09:27:35 +01:00
cifs_debug.h lib: update single-char callers of strtobool() 2016-10-28 03:01:30 -04:00
cifs_dfs_ref.c cifs: use correct format characters 2019-04-27 09:33:49 +02: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
cifs_spnego.c smb3: on kerberos mount if server doesn't specify auth type use krb5 2018-11-21 09:27:35 +01:00
cifs_spnego.h
cifs_unicode.c fs/cifs: don't translate SFM_SLASH (U+F026) to backslash 2018-10-10 08:52:11 +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
cifsproto.h CIFS: Fix a possible memory corruption during reconnect 2017-01-06 11:16:15 +01:00
cifssmb.c fs/cifs: suppress a string overflow warning 2018-10-10 08:52:12 +02:00
connect.c cifs: Fix NULL pointer dereference of devname 2019-04-27 09:33:49 +02:00
dir.c cifs: Fix separator when building path from dentry 2018-12-13 09:21:36 +01:00
dns_resolve.c
dns_resolve.h
export.c
file.c CIFS: cifs_read_allocate_pages: don't iterate through whole page array on ENOMEM 2019-06-11 12:24:10 +02:00
fscache.c
fscache.h
inode.c cifs: do not attempt cifs operation on smb2+ rename error 2019-05-16 19:44:43 +02:00
ioctl.c cifs: fix CIFS_IOC_GET_MNT_INFO oops 2017-05-20 14:27:01 +02:00
Kconfig Revert "cifs: In Kconfig CONFIG_CIFS_POSIX needs depends on legacy (insecure cifs)" 2019-02-20 10:13:20 +01:00
link.c smb3: don't request leases in symlink creation and query 2018-09-05 09:18:37 +02:00
Makefile
misc.c cifs: read overflow in is_valid_oplock_break() 2018-10-10 08:52:12 +02: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: check ntwrk_buf_start for NULL before dereferencing it 2019-02-20 10:13:13 +01:00
rfc1002pdu.h
sess.c cifs: check kmalloc before use 2018-09-05 09:18:37 +02:00
smb1ops.c cifs: use correct format characters 2019-04-27 09:33:49 +02:00
smb2file.c cifs: Limit memory used by lock request calls to a page 2019-02-20 10:13:21 +01:00
smb2glob.h cifs: Limit the overall credit acquired 2016-10-28 03:01:32 -04:00
smb2inode.c smb3: Do not send SMB3 SET_INFO if nothing changed 2018-09-05 09:18:37 +02:00
smb2maperror.c fix incorrect error code mapping for OBJECTID_NOT_FOUND 2019-04-27 09:33:58 +02:00
smb2misc.c cifs: check if SMB2 PDU size has been padded and suppress the warning 2018-09-15 09:40:37 +02:00
smb2ops.c cifs: fix strcat buffer overflow and reduce raciness in smb21_set_oplock_level() 2019-06-11 12:23:45 +02:00
smb2pdu.c CIFS: Do not count -ENODATA as failure for query directory 2019-02-06 19:43:06 +01:00
smb2pdu.h cifs: fix computation for MAX_SMB2_HDR_SIZE 2019-03-23 08:44:26 +01: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
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 CIFS: Do not hide EINTR after sending network packets 2019-01-16 22:16:10 +01:00
winucase.c
xattr.c