linux-stable/drivers
Yingjoe Chen 8bf2a24467 i2c: dev: fix potential memory leak in i2cdev_ioctl_rdwr
[ Upstream commit a0692f0eef ]

If I2C_M_RECV_LEN check failed, msgs[i].buf allocated by memdup_user
will not be freed. Pump index up so it will be freed.

Fixes: 838bfa6049 ("i2c-dev: Add support for I2C_M_RECV_LEN")
Signed-off-by: Yingjoe Chen <yingjoe.chen@mediatek.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-06-22 08:16:17 +02:00
..
accessibility
acpi pstore: Convert buf_lock to semaphore 2019-06-11 12:21:48 +02:00
amba
android binder: fix race between munmap() and direct reclaim 2019-06-09 09:18:20 +02:00
ata libata: Extend quirks for the ST1000LM024 drives with NOLPM quirk 2019-06-19 08:20:54 +02:00
atm atm: he: fix sign-extension overflow on large shift 2019-02-27 10:08:05 +01:00
auxdisplay auxdisplay: hd44780: Fix memory leak on ->remove() 2019-04-20 09:15:00 +02:00
base PM / core: Propagate dev->power.wakeup_path when no callbacks 2019-05-31 06:47:28 -07:00
bcma
block virtio-blk: limit number of hw queues by nr_cpu_ids 2019-05-10 17:53:12 +02:00
bluetooth Bluetooth: btusb: request wake pin with NOAUTOEN 2019-05-08 07:20:51 +02:00
bus bus: arm-cci: remove unnecessary unreachable() 2018-12-01 09:42:49 +01:00
cdrom cdrom: Fix race condition in cdrom_sysctl_register 2019-04-05 22:31:35 +02:00
char hwrng: omap - Set default quality 2019-05-31 06:47:34 -07:00
clk clk: ti: clkctrl: Fix clkdm_clk handling 2019-06-22 08:16:16 +02:00
clocksource clocksource/drivers/oxnas: Fix OX820 compatible 2019-05-16 19:42:21 +02:00
connector
cpufreq cpufreq: kirkwood: fix possible object reference leak 2019-05-31 06:47:29 -07:00
cpuidle cpuidle: big.LITTLE: fix refcount leak 2019-02-12 19:46:03 +01:00
crypto crypto: vmx - ghash: do nosimd fallback manually 2019-06-09 09:18:12 +02:00
dax
dca
devfreq
dio
dma dmaengine: idma64: Use actual device for DMA transfers 2019-06-15 11:54:59 +02:00
dma-buf
edac EDAC/mpc85xx: Prevent building as a module 2019-06-15 11:54:52 +02:00
eisa
extcon extcon: arizona: Disable mic detect if running when driver is removed 2019-05-31 06:47:28 -07:00
firewire
firmware pstore: Convert buf_lock to semaphore 2019-06-11 12:21:48 +02:00
fmc
fpga fpga: altera-cvp: Fix registration for CvP incapable devices 2019-02-12 19:45:58 +01:00
fsi
gpio gpio: fix gpio-adp5588 build errors 2019-06-22 08:16:16 +02:00
gpu drm/vmwgfx: NULL pointer dereference from vmw_cmd_dx_view_define() 2019-06-19 08:20:58 +02:00
hid HID: wacom: Sync INTUOSP2_BT touch state after each frame if necessary 2019-06-19 08:20:53 +02:00
hsi
hv Drivers: hv: vmbus: Remove the undesired put_cpu_ptr() in hv_synic_cleanup() 2019-05-10 17:53:08 +02:00
hwmon hwmon: (f71805f) Use request_muxed_region for Super-IO accesses 2019-05-31 06:47:27 -07:00
hwspinlock
hwtracing intel_th: msu: Fix single mode with IOMMU 2019-05-25 18:25:19 +02:00
i2c i2c: dev: fix potential memory leak in i2cdev_ioctl_rdwr 2019-06-22 08:16:17 +02:00
ide ide: pmac: add of_node_put() 2018-12-21 14:13:14 +01:00
idle x86/cpu: Sanitize FAM6_ATOM naming 2019-05-14 19:18:42 +02:00
iio iio: common: ssp_sensors: Initialize calculated_time in ssp_common_process_data 2019-05-31 06:47:29 -07:00
infiniband RDMA/hns: Fix bad endianess of port_pd variable 2019-05-31 06:47:31 -07:00
input Input: elan_i2c - add hardware ID for multiple Lenovo laptops 2019-05-16 19:42:30 +02:00
iommu iommu/arm-smmu: Avoid constant zero in TLBI writes 2019-06-19 08:20:55 +02:00
ipack
irqchip Revert "MIPS: perf: ath79: Fix perfcount IRQ assignment" 2019-06-11 12:21:49 +02:00
isdn mISDN: make sure device name is NUL terminated 2019-06-22 08:16:16 +02:00
leds leds: pwm: silently error out on EPROBE_DEFER 2019-05-16 19:42:29 +02:00
lightnvm
macintosh
mailbox mailbox: bcm-flexrm-mailbox: Fix FlexRM ring flush timeout issue 2019-03-23 14:35:15 +01:00
mcb
md bcache: fix stack corruption by PRECEDING_KEY() 2019-06-19 08:20:55 +02:00
media media: v4l2-ioctl: clear fields in s_parm 2019-06-19 08:20:55 +02:00
memory memory: tegra: Fix integer overflow on tick value calculation 2019-05-25 18:25:25 +02:00
memstick memstick: Prevent memstick host from getting runtime suspended during card detection 2019-02-12 19:46:04 +01:00
message
mfd mfd: twl6040: Fix device init errors for ACCCTL register 2019-06-15 11:54:52 +02:00
misc Drivers: misc: fix out-of-bounds access in function param_set_kgdbts_var 2019-06-19 08:20:56 +02:00
mmc mmc: mmci: Prevent polling for busy detection in IRQ context 2019-06-15 11:54:53 +02:00
mtd mtd: spi-nor: intel-spi: Avoid crossing 4K address boundary on read/write 2019-05-21 18:50:17 +02:00
mux
net net: aquantia: fix LRO with FCS error 2019-06-22 08:16:17 +02:00
nfc spi: ST ST95HF NFC: declare missing of table 2019-05-16 19:42:24 +02:00
ntb
nubus
nvdimm libnvdimm: Fix compilation warnings with W=1 2019-06-19 08:20:57 +02:00
nvme nvme: remove the ifdef around nvme_nvm_ioctl 2019-06-19 08:20:57 +02:00
nvmem nvmem: core: fix read buffer in place 2019-06-15 11:54:54 +02:00
of OF: properties: add missing of_node_put 2019-01-23 08:09:49 +01:00
oprofile
parisc parisc: Use implicit space register selection for loading the coherence index of I/O pdirs 2019-06-11 12:21:47 +02:00
parport parport_pc: fix find_superio io compare code, should use equal test. 2019-03-23 14:35:24 +01:00
pci PCI: xilinx: Check for __get_free_pages() failure 2019-06-15 11:54:58 +02:00
pcmcia
perf
phy phy: sun4i-usb: Make sure to disable PHY0 passby for peripheral mode 2019-05-31 06:47:26 -07:00
pinctrl pinctrl: samsung: fix leaked of_node references 2019-05-31 06:47:24 -07:00
platform platform/x86: pmc_atom: Add several Beckhoff Automation boards to critclk_systems DMI table 2019-06-19 08:20:57 +02:00
pnp
power power: supply: max14656: fix potential use-before-alloc 2019-06-15 11:54:57 +02:00
powercap x86/cpu: Sanitize FAM6_ATOM naming 2019-05-14 19:18:42 +02:00
pps
ps3
ptp ptp: Fix pass zero to ERR_PTR() in ptp_clock_register 2019-02-12 19:45:59 +01:00
pwm pwm: Fix deadlock warning when removing PWM device 2019-06-15 11:54:59 +02:00
rapidio rapidio: fix a NULL pointer dereference when create_workqueue() fails 2019-06-15 11:54:50 +02:00
ras RAS/CEC: Fix binary search function 2019-06-19 08:20:59 +02:00
regulator regulator: act8865: Fix act8600_sudcdc_voltage_ranges setting 2019-04-05 22:31:39 +02:00
remoteproc
reset reset: make device_reset_optional() really optional 2018-12-08 13:03:40 +01:00
rpmsg
rtc rtc: pcf8523: don't return invalid date when battery is low 2019-06-19 08:21:00 +02:00
s390 scsi: zfcp: fix to prevent port_remove with pure auto scan LUNs (only sdevs) 2019-06-09 09:18:15 +02:00
sbus drivers/sbus/char: add of_node_put() 2018-12-21 14:13:13 +01:00
scsi scsi: bnx2fc: fix incorrect cast to u64 on shift operation 2019-06-19 08:20:57 +02:00
sfi
sh
sn
soc soc: rockchip: Set the proper PWM for rk3288 2019-06-15 11:54:55 +02:00
spi dmaengine: idma64: Use actual device for DMA transfers 2019-06-15 11:54:59 +02:00
spmi
ssb ssb: Fix possible NULL pointer dereference in ssb_host_pcmcia_exit 2019-05-31 06:47:13 -07:00
staging Staging: vc04_services: Fix a couple error codes 2019-06-22 08:16:15 +02:00
target scsi: target/iscsi: Avoid iscsit_release_commands_from_conn() deadlock 2019-03-23 14:35:20 +01:00
tc
tee
thermal drivers: thermal: tsens: Don't print error message on -EPROBE_DEFER 2019-06-15 11:54:52 +02:00
thunderbolt thunderbolt: Fix to check for kmemdup failure 2019-05-31 06:47:34 -07:00
tty sunhv: Fix device naming inconsistency between sunhv_console and sunhv_reg 2019-06-22 08:16:15 +02:00
uio Revert "uio: use request_threaded_irq instead" 2019-02-15 08:09:14 +01:00
usb USB: serial: option: add Telit 0x1260 and 0x1261 compositions 2019-06-19 08:20:59 +02:00
uwb
vfio vfio: Fix WARNING "do not call blocking ops when !TASK_RUNNING" 2019-06-15 11:54:54 +02:00
vhost vhost: reject zero size iova range 2019-04-27 09:35:34 +02:00
video video: imsttfb: fix potential NULL pointer dereferences 2019-06-15 11:54:57 +02:00
virt drivers/virt/fsl_hypervisor.c: prevent integer overflow in ioctl 2019-05-16 19:42:35 +02:00
virtio virtio_pci: fix a NULL pointer reference in vp_del_vqs 2019-05-10 17:53:11 +02:00
vlynq
vme
w1 w1: fix the resume command API 2019-05-31 06:47:21 -07:00
watchdog watchdog: fix compile time error of pretimeout governors 2019-06-15 11:54:54 +02:00
xen fs: stream_open - opener for stream-like files so that read and write can run simultaneously without deadlock 2019-06-11 12:21:51 +02:00
zorro
Kconfig
Makefile