android_kernel_oneplus_msm8998/drivers
Todd Kjos d3a52e0ec2 binder: fix race between munmap() and direct reclaim
An munmap() on a binder device causes binder_vma_close() to be called
which clears the alloc->vma pointer.

If direct reclaim causes binder_alloc_free_page() to be called, there
is a race where alloc->vma is read into a local vma pointer and then
used later after the mm->mmap_sem is acquired. This can result in
calling zap_page_range() with an invalid vma which manifests as a
use-after-free in zap_page_range().

The fix is to check alloc->vma after acquiring the mmap_sem (which we
were acquiring anyway) and bail out of binder_alloc_free_page() if it
has changed to NULL.

Change-Id: I9ea0558a57635a747d7a48ed35991d39b860abf6
Signed-off-by: Todd Kjos <tkjos@google.com>
(cherry picked from commit 7257eac9401f989a62503b6c12a47af1b10591d1)
2019-03-30 07:59:30 +01:00
..
accessibility
acpi ACPI / PM: save NVS memory for ASUS 1025C laptop 2018-08-22 07:48:37 +02:00
amba
android binder: fix race between munmap() and direct reclaim 2019-03-30 07:59:30 +01:00
ata libata: Fix command retry decision 2018-08-06 16:24:36 +02:00
atm atm: zatm: Fix potential Spectre v1 2018-07-22 14:25:52 +02:00
auxdisplay
base cpuidle: don't disable cpuidle when entering suspend 2018-12-26 08:21:03 +01:00
bcma
bif
block Merge android-4.4.153 (5e24b4e) into msm-4.4 2018-08-28 17:28:39 +05:30
bluetooth Synchronize codes for OnePlus5 & 5T OxygenOS 9.0.0 2018-12-26 11:02:39 +08:00
bus
cdrom
char Merge tag 'LA.UM.7.4.r1-04700-8x98.0' into auto 2019-03-10 16:59:28 +01:00
clk clk: qcom: mdss: avoid release of the dynamic fps PLL code memory 2018-12-26 07:58:27 +01:00
clocksource
connector
cpufreq cpufreq: deoneplusify and remove PM QOS changes 2018-12-30 10:12:25 +01:00
cpuidle Synchronize codes for OnePlus5 & 5T OxygenOS 9.0.0 2018-12-26 11:02:39 +08:00
crypto Merge tag 'LA.UM.7.4.r1-04700-8x98.0' into auto 2019-03-10 16:59:28 +01:00
dca
devfreq Synchronize codes for OnePlus5 & 5T OxygenOS 9.0.0 2018-12-26 11:02:39 +08:00
dio
dma Merge android-4.4.153 (5e24b4e) into msm-4.4 2018-08-28 17:28:39 +05:30
dma-buf
edac
eisa
esoc
extcon Synchronize codes for OnePlus5 & 5T OxygenOS 9.0.0 2018-12-26 11:02:39 +08:00
firewire
firmware Synchronize codes for OnePlus5 & 5T OxygenOS 9.0.0 2018-12-26 11:02:39 +08:00
fmc
fpga
gpio soc: qcom: Remove smp2p test support 2018-12-26 07:58:27 +01:00
gpu msm: kgsl: Don't halt dispatcher if device is not in SUSPEND state 2018-12-26 07:58:27 +01:00
hid Merge android-4.4.153 (5e24b4e) into msm-4.4 2018-08-28 17:28:39 +05:30
hsi
hv
hwmon platform: msm: resolve NULL pointer dereference issue 2018-08-16 11:45:37 +08:00
hwspinlock
hwtracing coresight: fix handling of ETM management register access via sysfs 2018-10-29 19:36:46 -07:00
i2c i2c-msm-v2: Handle Null pointer de-reference 2018-12-26 07:54:00 +01:00
ide
idle
iio Merge android-4.4.139 (7ba5557) into msm-4.4 2018-07-03 12:24:56 -07:00
infiniband IB/ocrdma: fix out of bounds access to local buffer 2018-08-15 17:42:06 +02:00
input tri-state-key: send proper input when updating keycodes from userspace 2019-03-13 20:23:25 +01:00
iommu Merge tag 'LA.UM.7.4.r1-04700-8x98.0' into auto 2019-03-10 16:59:28 +01:00
ipack
irqchip Synchronize codes for OnePlus5 & 5T OxygenOS 9.0.0 2018-12-26 11:02:39 +08:00
isdn isdn: Disable IIOCDBGVAR 2018-08-22 07:48:38 +02:00
leds leds-qpnp: revert changes made by op 2018-12-26 08:21:02 +01:00
lguest
lightnvm
macintosh
mailbox
mcb
md Merge android-4.4.153 (5e24b4e) into msm-4.4 2018-08-28 17:28:39 +05:30
media media: em28xx: Fix use-after-free when disconnecting 2019-03-30 07:59:30 +01:00
memory memory: tegra: Apply interrupts mask per SoC 2018-08-06 16:24:38 +02:00
memstick
message
mfd Synchronize codes for OnePlus5 & 5T OxygenOS 9.0.0 2018-12-26 11:02:39 +08:00
misc Synchronize codes for OnePlus5 & 5T OxygenOS 9.0.0 2018-12-26 11:02:39 +08:00
mmc mmc: core: Use mmc_get_cd_gpio to get cd gpio status in resume path 2018-07-26 18:22:44 +05:30
mtd Merge android-4.4.146 (13962260) into msm-4.4 2018-08-07 15:36:56 +05:30
net Merge tag 'LA.UM.7.4.r1-04700-8x98.0' into auto 2019-03-10 16:59:28 +01:00
nfc Synchronize codes for OnePlus5 & 5T OxygenOS 9.0.0 2018-12-26 11:02:39 +08:00
ntb
nubus
nvdimm
nvme nvme-pci: initialize queue memory before interrupts 2018-07-11 16:03:47 +02:00
nvmem
of Increase MAX_RESERVED_REGIONS 2019-01-05 10:01:15 +01:00
oneplus drivers: Allow disabling OEM debug support 2018-12-26 08:21:02 +01:00
oprofile
param_read_write Synchronize codes for OnePlus5 & 5T OxygenOS 9.0.0 2018-12-26 11:02:39 +08:00
parisc
parport
pci Synchronize codes for OnePlus5 & 5T OxygenOS 9.0.0 2018-12-26 11:02:39 +08:00
pcmcia
perf
phy
pinctrl cpufreq: deoneplusify and remove PM QOS changes 2018-12-30 10:12:25 +01:00
platform Merge tag 'LA.UM.7.4.r1-04700-8x98.0' into auto 2019-03-10 16:59:28 +01:00
pnp
power smb: enable otg feature on driver init and based on dash status 2018-12-27 14:28:05 +01:00
powercap
pps
ps3
ptp ptp: fix missing break in switch 2018-07-25 10:18:17 +02:00
pwm pwm: qpnp: Fix qcom HW known issue 2018-12-26 08:21:02 +01:00
rapidio
ras
regulator Synchronize codes for OnePlus5 & 5T OxygenOS 9.0.0 2018-12-26 11:02:39 +08:00
remoteproc
reset
rpmsg
rtc Synchronize codes for OnePlus5 & 5T OxygenOS 9.0.0 2018-12-26 11:02:39 +08:00
s390
sbus
scsi Synchronize codes for OnePlus5 & 5T OxygenOS 9.0.0 2018-12-26 11:02:39 +08:00
sensors
sfi
sh
slimbus
sn
soc Merge tag 'LA.UM.7.4.r1-04700-8x98.0' into auto 2019-03-10 16:59:28 +01:00
soundwire soc: soundwire: Fix wsa mute issue for stereo playback 2018-12-26 07:53:59 +01:00
spi Merge android-4.4.139 (7ba5557) into msm-4.4 2018-07-03 12:24:56 -07:00
spmi Synchronize codes for OnePlus5 & 5T OxygenOS 9.0.0 2018-12-26 11:02:39 +08:00
ssb
staging BACKPORT: cfg80211: remove enum ieee80211_band 2018-12-26 08:21:02 +01:00
switch
target
tc
tee
thermal Synchronize codes for OnePlus5 & 5T OxygenOS 9.0.0 2018-12-26 11:02:39 +08:00
thunderbolt
tty Synchronize codes for OnePlus5 & 5T OxygenOS 9.0.0 2018-12-26 11:02:39 +08:00
uio uio: msm_sharedmem: add guard page around shared memory 2018-08-16 08:00:12 -07:00
usb usb: dwc3-msm: Initialize mutex before registering extcon 2019-03-30 07:59:30 +01:00
uwb
vfio
vhost vhost_net: validate sock before trying to put its fd 2018-07-22 14:25:53 +02:00
video Merge tag 'LA.UM.7.4.r1-04700-8x98.0' into auto 2019-03-10 16:59:28 +01:00
virt
virtio Merge android-4.4.146 (13962260) into msm-4.4 2018-08-07 15:36:56 +05:30
vlynq
vme
w1 This is the 4.4.139 stable release 2018-07-03 18:23:34 +02:00
watchdog
xen
zorro
Kconfig Synchronize codes for OnePlus5 & 5T OxygenOS 9.0.0 2018-12-26 11:02:39 +08:00
Makefile Synchronize codes for OnePlus5 & 5T OxygenOS 9.0.0 2018-12-26 11:02:39 +08:00