Todd Kjos
7aedba616c
UPSTREAM: binder: fix async_free_space accounting for empty parcels
...
commit cfd0d84ba28c18b531648c9d4a35ecca89ad9901 upstream.
In 4.13, commit 74310e06be ("android: binder: Move buffer out of area shared with user space")
fixed a kernel structure visibility issue. As part of that patch,
sizeof(void *) was used as the buffer size for 0-length data payloads so
the driver could detect abusive clients sending 0-length asynchronous
transactions to a server by enforcing limits on async_free_size.
Unfortunately, on the "free" side, the accounting of async_free_space
did not add the sizeof(void *) back. The result was that up to 8-bytes of
async_free_space were leaked on every async transaction of 8-bytes or
less. These small transactions are uncommon, so this accounting issue
has gone undetected for several years.
The fix is to use "buffer_size" (the allocated buffer size) instead of
"size" (the logical buffer size) when updating the async_free_space
during the free operation. These are the same except for this
corner case of asynchronous transactions with payloads < 8 bytes.
Fixes: 74310e06be ("android: binder: Move buffer out of area shared with user space")
Signed-off-by: Todd Kjos <[email protected] >
Cc: [email protected] # 4.14+
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected] >
Change-Id: Ie01082a056bff56f51035c0f6be34e136bd56faf
2022-01-31 14:15:02 -08:00
..
accessibility
acpi
This is the 5.4.160 stable release
2021-11-17 10:19:21 +01:00
amba
This is the 5.4.158 stable release
2021-11-06 14:08:38 +01:00
android
UPSTREAM: binder: fix async_free_space accounting for empty parcels
2022-01-31 14:15:02 -08:00
ata
libata: fix checking of DMA state
2021-11-17 09:48:23 +01:00
atm
atm: nicstar: register the interrupt handler in the right place
2021-07-19 08:53:12 +02:00
auxdisplay
auxdisplay: ht16k33: Fix frame buffer device blanking
2021-11-17 09:48:45 +01:00
base
UPSTREAM: driver core: Fix possible memory leak in device_link_add()
2022-01-24 11:41:01 -08:00
bcma
bcma: Fix memory leak for internally-handled cores
2021-09-15 09:47:37 +02:00
block
This is the 5.4.160 stable release
2021-11-17 10:19:21 +01:00
bluetooth
This is the 5.4.160 stable release
2021-11-17 10:19:21 +01:00
bus
bus: ti-sysc: Use CLKDM_NOAUTO for dra7 dcan1 for errata i893
2021-10-13 10:08:19 +02:00
cdrom
char
This is the 5.4.160 stable release
2021-11-17 10:19:21 +01:00
clk
This is the 5.4.160 stable release
2021-11-17 10:19:21 +01:00
clocksource
This is the 5.4.160 stable release
2021-11-17 10:19:21 +01:00
connector
counter
counter: 104-quad-8: Return error when invalid mode during ceiling_write
2021-09-15 09:47:34 +02:00
cpufreq
This is the 5.4.151 stable release
2021-10-06 15:51:50 +02:00
cpuidle
This is the 5.4.160 stable release
2021-11-17 10:19:21 +01:00
crypto
This is the 5.4.160 stable release
2021-11-17 10:19:21 +01:00
dax
dca
devfreq
dio
dma
This is the 5.4.160 stable release
2021-11-17 10:19:21 +01:00
dma-buf
This is the 5.4.160 stable release
2021-11-17 10:19:21 +01:00
edac
EDAC/amd64: Handle three rank interleaving mode
2021-11-17 09:48:36 +01:00
eisa
extcon
Merge 5.4.133 into android11-5.4-lts
2021-07-20 11:32:58 +02:00
firewire
firmware
This is the 5.4.160 stable release
2021-11-17 10:19:21 +01:00
fpga
fpga: machxo2-spi: Fix missing error code in machxo2_write_complete()
2021-09-30 10:09:23 +02:00
fsi
gnss
gpio
gpio: pca953x: Improve bias setting
2021-10-20 11:40:15 +02:00
gpu
This is the 5.4.160 stable release
2021-11-17 10:19:21 +01:00
greybus
hid
Merge tag 'android11-5.4.161_r00' into android11-5.4
2022-01-21 08:26:49 +01:00
hsi
hv
hyperv/vmbus: include linux/bitops.h
2021-11-17 09:48:20 +01:00
hwmon
This is the 5.4.160 stable release
2021-11-17 10:19:21 +01:00
hwspinlock
hwtracing
intel_th: Wait until port is in reset before programming it
2021-07-20 16:10:46 +02:00
i2c
This is the 5.4.160 stable release
2021-11-17 10:19:21 +01:00
i3c
ide
idle
iio
iio: dac: ad5446: Fix ad5622_write() return value
2021-11-17 09:48:26 +01:00
infiniband
This is the 5.4.160 stable release
2021-11-17 10:19:21 +01:00
input
Input: i8042 - Add quirk for Fujitsu Lifebook T725
2021-11-17 09:48:17 +01:00
interconnect
iommu
Linux 5.4.143
2021-08-27 22:38:57 +02:00
ipack
ipack: ipoctal: fix module reference leak
2021-10-06 15:42:36 +02:00
irqchip
This is the 5.4.160 stable release
2021-11-17 10:19:21 +01:00
isdn
isdn: mISDN: Fix sleeping function called from invalid context
2021-10-27 09:54:29 +02:00
leds
leds: trigger: audio: Add an activate callback to ensure the initial brightness is set
2021-09-15 09:47:33 +02:00
lightnvm
macintosh
mailbox
mcb
mcb: fix error handling in mcb_alloc_bus()
2021-09-30 10:09:22 +02:00
md
This is the 5.4.150 stable release
2021-10-01 14:08:40 +02:00
media
This is the 5.4.160 stable release
2021-11-17 10:19:21 +01:00
memory
memory: fsl_ifc: fix leak of irq and nand_irq in fsl_ifc_ctrl_probe
2021-11-17 09:48:42 +01:00
memstick
memstick: jmb38x_ms: use appropriate free function in jmb38x_ms_alloc_host()
2021-11-17 09:48:37 +01:00
message
mfd
This is the 5.4.148 stable release
2021-09-25 14:41:58 +02:00
misc
This is the 5.4.155 stable release
2021-10-20 12:35:49 +02:00
mmc
This is the 5.4.160 stable release
2021-11-17 10:19:21 +01:00
mtd
This is the 5.4.160 stable release
2021-11-17 10:19:21 +01:00
mux
net
This is the 5.4.160 stable release
2021-11-17 10:19:21 +01:00
nfc
nfc: pn533: Fix double free when pn533_fill_fragment_skbs() fails
2021-11-17 09:48:47 +01:00
ntb
NTB: perf: Fix an error code in perf_setup_inbuf()
2021-09-22 12:26:44 +02:00
nubus
nvdimm
libnvdimm/pmem: Fix crash triggered when I/O in-flight during unbind
2021-10-06 15:42:38 +02:00
nvme
nvme-rdma: fix error code in nvme_rdma_setup_ctrl
2021-11-17 09:48:38 +01:00
nvmem
This is the 5.4.155 stable release
2021-10-20 12:35:49 +02:00
of
Merge branch 'android11-5.4' into 'android11-5.4-lts'
2021-10-14 09:25:51 +02:00
opp
This is the 5.4.160 stable release
2021-11-17 10:19:21 +01:00
oprofile
parisc
parisc: Move pci_dev_is_behind_card_dino to where it is used
2021-09-26 14:07:10 +02:00
parport
parport: remove non-zero check on count
2021-09-22 12:26:36 +02:00
pci
This is the 5.4.161 stable release
2021-11-21 15:34:05 +01:00
pcmcia
pcmcia: i82092: fix a null pointer dereference bug
2021-08-12 13:21:03 +02:00
perf
phy
This is the 5.4.160 stable release
2021-11-17 10:19:21 +01:00
pinctrl
This is the 5.4.160 stable release
2021-11-17 10:19:21 +01:00
platform
This is the 5.4.160 stable release
2021-11-17 10:19:21 +01:00
pnp
power
This is the 5.4.160 stable release
2021-11-17 10:19:21 +01:00
powercap
pps
ps3
ptp
ptp_pch: Load module automatically if ID matches
2021-10-13 10:08:19 +02:00
pwm
Merge 5.4.149 into android11-5.4-lts
2021-10-01 14:07:54 +02:00
rapidio
ras
regulator
This is the 5.4.160 stable release
2021-11-17 10:19:21 +01:00
remoteproc
reset
This is the 5.4.160 stable release
2021-11-17 10:19:21 +01:00
rpmsg
rtc
Merge 5.4.149 into android11-5.4-lts
2021-10-01 14:07:54 +02:00
s390
s390/cio: make ccw_device_dma_* more robust
2021-11-17 09:48:50 +01:00
sbus
scsi
This is the 5.4.161 stable release
2021-11-21 15:34:05 +01:00
sfi
sh
siox
slimbus
Linux 5.4.143
2021-08-27 22:38:57 +02:00
soc
This is the 5.4.161 stable release
2021-11-21 15:34:05 +01:00
soundwire
spi
This is the 5.4.160 stable release
2021-11-17 10:19:21 +01:00
spmi
ssb
staging
This is the 5.4.160 stable release
2021-11-17 10:19:21 +01:00
target
scsi: target: avoid per-loop XCOPY buffer allocations
2021-09-22 12:26:25 +02:00
tc
tee
UPSTREAM: tee: handle lookup of shm with reference count 0
2022-01-26 08:46:30 +00:00
thermal
Merge tag 'android11-5.4.147_r00' android11-5.4
2021-10-20 10:32:16 +02:00
thunderbolt
tty
Revert "serial: core: Fix initializing and restoring termios speed"
2021-11-19 13:42:39 +01:00
uio
usb
Merge tag 'android11-5.4.161_r00' into android11-5.4
2022-01-21 08:26:49 +01:00
vfio
This is the 5.4.148 stable release
2021-09-25 14:41:58 +02:00
vhost
This is the 5.4.148 stable release
2021-09-25 14:41:58 +02:00
video
This is the 5.4.160 stable release
2021-11-17 10:19:21 +01:00
virt
virtio
This is the 5.4.155 stable release
2021-10-20 12:35:49 +02:00
visorbus
vlynq
vme
w1
w1: ds2438: fixing bug that would always get page0
2021-07-20 16:10:41 +02:00
watchdog
ar7: fix kernel builds for compiler test
2021-11-17 09:48:46 +01:00
xen
xen-pciback: Fix return in pm_ctrl_init()
2021-11-17 09:48:46 +01:00
zorro
Kconfig
Makefile
OWNERS