android_kernel_sony_sdm845/drivers
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Jonathan Cameron 84509066d3 iio:gyro:itg3200: Fix timestamp alignment and prevent data leak.
commit 10ab7cfd5522f0041028556dac864a003e158556 upstream.

One of a class of bugs pointed out by Lars in a recent review.
iio_push_to_buffers_with_timestamp assumes the buffer used is aligned
to the size of the timestamp (8 bytes).  This is not guaranteed in
this driver which uses a 16 byte array of smaller elements on the stack.
This is fixed by using an explicit c structure. As there are no
holes in the structure, there is no possiblity of data leakage
in this case.

The explicit alignment of ts is not strictly necessary but potentially
makes the code slightly less fragile.  It also removes the possibility
of this being cut and paste into another driver where the alignment
isn't already true.

Fixes: 36e0371e77 ("iio:itg3200: Use iio_push_to_buffers_with_timestamp()")
Reported-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: <Stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20200722155103.979802-6-jic23@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-11-10 10:23:58 +01:00
..
accessibility
acpi ACPI: debug: don't allow debugging when ACPI is disabled 2020-11-10 10:23:56 +01:00
amba
android binder: Prevent context manager from incrementing ref 0 2020-08-21 11:01:55 +02:00
ata ata: sata_rcar: Fix DMA boundary mask 2020-11-10 10:23:51 +01:00
atm atm: eni: fix the missed pci_disable_device() for eni_init_one() 2020-10-01 20:40:17 +02:00
auxdisplay
base driver core: Fix probe_count imbalance in really_probe() 2020-10-14 09:48:15 +02:00
bcma bcma: fix incorrect update of BCMA_CORE_PCI_MDIO_DATA 2020-01-29 10:24:31 +01:00
block rbd: require global CAP_SYS_ADMIN for mapping and unmapping 2020-09-23 08:46:12 +02:00
bluetooth Bluetooth: btusb: fix PM leak in error case of setup 2020-01-12 11:24:16 +01:00
bus bus: sunxi-rsb: Return correct data when mixing 16-bit and 8-bit reads 2020-04-24 07:58:46 +02:00
cdrom cdrom: respect device capabilities during opening action 2020-01-04 13:41:02 +01:00
char drivers: char: tlclk.c: Avoid data race between init and interrupt handler 2020-10-01 20:40:12 +02:00
clk clk: ti: clockdomain: fix static checker warning 2020-11-10 10:23:54 +01:00
clocksource clocksource/drivers/h8300_timer8: Fix wrong return value in h8300_8timer_init() 2020-10-01 20:40:17 +02:00
connector
cpufreq acpi-cpufreq: Honor _PSD table setting on new AMD CPUs 2020-11-10 10:23:56 +01:00
cpuidle cpuidle: Fix three reference count leaks 2020-06-20 10:24:18 +02:00
crypto crypto: ccp - fix error handling 2020-10-29 09:05:41 +01:00
dax
dca
devfreq PM / devfreq: tegra30: Fix integer overflow on CPU's freq max out 2020-10-01 20:40:02 +02:00
dio
dma dmaengine: dma-jz4780: Fix race in jz4780_dma_tx_status 2020-11-10 10:23:58 +01:00
dma-buf dma-buf: Fix memory leak in sync_file_merge() 2019-12-21 10:42:32 +01:00
edac EDAC/i5100: Fix error handling order in i5100_init_one() 2020-10-29 09:05:32 +01:00
eisa
extcon extcon: adc-jack: Fix an error handling path in 'adc_jack_probe()' 2020-06-30 15:38:28 -04:00
firewire net: add annotations on hh->hh_len lockless accesses 2020-01-12 11:24:19 +01:00
firmware efi: Make it possible to disable efivar_ssdt entirely 2020-07-09 09:35:57 +02:00
fmc
fpga
gpio gpio: tc35894: fix up tc35894 interrupt configuration 2020-10-14 09:48:12 +02:00
gpu Fix use after free in get_capset_info callback. 2020-10-29 09:05:45 +01:00
hid HID: roccat: add bounds checking in kone_sysfs_write_settings() 2020-10-29 09:05:35 +01:00
hsi
hv Drivers: hv: vmbus: Add timeout to vmbus_wait_for_unload 2020-09-23 08:46:15 +02:00
hwmon hwmon: (applesmc) check status earlier. 2020-09-12 11:47:32 +02:00
hwspinlock
hwtracing intel_th: Fix user-visible error codes 2020-04-02 17:20:25 +02:00
i2c i2c: cpm: Fix i2c_ram structure 2020-10-14 09:48:13 +02:00
ide block: Move SECTOR_SIZE and SECTOR_SHIFT definitions into <linux/blkdev.h> 2020-09-12 11:47:36 +02:00
idle
iio iio:gyro:itg3200: Fix timestamp alignment and prevent data leak. 2020-11-10 10:23:58 +01:00
infiniband IB/rdmavt: Fix sizeof mismatch 2020-10-29 09:05:39 +01:00
input Input: sun4i-ps2 - fix handling of platform_get_irq() error 2020-10-29 09:05:40 +01:00
iommu iommu/exynos: add missing put_device() call in exynos_iommu_of_xlate() 2020-10-14 09:48:13 +02:00
ipack
irqchip irqchip/gic: Atomically update affinity 2020-07-22 09:10:54 +02:00
isdn staging: gigaset: add endpoint-type sanity check 2019-12-21 10:41:50 +01:00
leds leds: bcm6328, bcm6358: use devres LED registering function 2020-11-10 10:23:56 +01:00
lguest
lightnvm
macintosh drivers/macintosh: Fix memleak in windfarm_pm112 driver 2020-06-20 10:24:21 +02:00
mailbox
mcb
md md/raid5: fix oops during stripe resizing 2020-11-10 10:23:55 +01:00
media media: tw5864: check status of tw5864_frameinterval_get 2020-11-10 10:23:53 +01:00
memory memory: emif: Remove bogus debugfs error handling 2020-11-10 10:23:55 +01:00
memstick
message scsi: mptfusion: Fix null pointer dereferences in mptscsih_remove() 2020-11-10 10:23:57 +01:00
mfd misc: rtsx: Fix memory leak in rtsx_pci_probe 2020-10-29 09:05:44 +01:00
misc eeprom: at25: set minimum read/write access stride to 1 2020-10-29 09:05:46 +01:00
mmc mmc: via-sdmmc: Fix data race bug 2020-11-10 10:23:53 +01:00
mtd mtd: mtdoops: Don't write panic data twice 2020-10-29 09:05:38 +01:00
net drivers/net/wan/hdlc_fr: Correctly handle special skb->protocol values 2020-11-10 10:23:54 +01:00
nfc NFC: st95hf: Fix memleak in st95hf_in_send_cmd 2020-09-23 08:46:09 +02:00
ntb NTB: hw: amd: fix an issue about leak system resources 2020-10-29 09:05:41 +01:00
nubus
nvdimm block: Move SECTOR_SIZE and SECTOR_SHIFT definitions into <linux/blkdev.h> 2020-09-12 11:47:36 +02:00
nvme nvmet: fix uninitialized work for zero kato 2020-10-29 09:05:41 +01:00
nvmem nvmem: qfprom: remove incorrect write support 2020-06-11 09:22:22 +02:00
of of: unittest: kmemleak in of_unittest_platform_populate() 2020-04-24 07:59:10 +02:00
oprofile
parisc parisc: mask out enable and reserved bits from sba imask 2020-08-21 11:02:06 +02:00
parport parport: load lowlevel driver if ports not found 2020-01-04 13:39:55 +01:00
pci PCI: Fix pci_create_slot() reference count leak 2020-09-03 11:21:17 +02:00
pcmcia
perf
phy phy: samsung: s5pv210-usb2: Add delay after reset 2020-10-01 20:40:12 +02:00
pinctrl pinctrl-single: fix pcs_parse_pinconf() return value 2020-08-21 11:02:04 +02:00
platform platform/x86: thinkpad_acpi: re-initialize ACPI buffer size when reuse 2020-10-14 09:48:15 +02:00
pnp
power power: supply: test_power: add missing newlines when printing parameters by sysfs 2020-11-10 10:23:54 +01:00
powercap
pps
ps3
ptp ptp: free ptp device pin descriptors properly 2020-05-20 08:15:33 +02:00
pwm pwm: bcm-iproc: handle clk_get_rate() return 2020-08-21 11:02:10 +02:00
rapidio rapidio: fix the missed put_device() for rio_mport_add_riodev 2020-10-29 09:05:39 +01:00
ras
regulator regulator: resolve supply after creating regulator 2020-10-29 09:05:33 +01:00
remoteproc remoteproc: Fix wrong rvring index computation 2020-05-02 17:23:14 +02:00
reset reset: Fix potential use-after-free in __of_reset_control_get() 2019-11-25 09:53:42 +01:00
rpmsg
rtc rtc: pm8xxx: Fix issue in RTC write path 2020-04-24 07:59:09 +02:00
s390 s390/cio: add cond_resched() in the slow_eval_known_fn() loop 2020-09-03 11:21:19 +02:00
sbus
scsi scsi: ibmvfc: Fix error return in ibmvfc_probe() 2020-10-29 09:05:45 +01:00
sfi
sh
sn
soc soc: qcom: smem: Use le32_to_cpu for comparison 2020-04-24 07:59:10 +02:00
spi spi: spi-loopback-test: Fix out-of-bounds read 2020-09-23 08:46:14 +02:00
spmi
ssb
staging bus/fsl_mc: Do not rely on caller to provide non NULL mc_io 2020-11-10 10:23:54 +01:00
target scsi: target: iscsi: Fix hang in iscsit_access_np() when getting tpg->np_login_sem 2020-09-23 08:46:12 +02:00
tc
thermal thermal: ti-soc-thermal: Fix bogus thermal shutdowns for omap4430 2020-09-12 11:47:34 +02:00
thunderbolt
tty vt: keyboard, extend func_buf_lock to readers 2020-11-10 10:23:58 +01:00
uio uio_pdrv_genirq: fix use without device tree and no interrupt 2020-07-22 09:10:53 +02:00
usb usb: host: fsl-mph-dr-of: check return of dma_set_mask() 2020-11-10 10:23:57 +01:00
uwb
vfio vfio/pci: Clear token on bypass registration failure 2020-10-29 09:05:40 +01:00
vhost vhost: vsock: kick send_pkt worker once device is started 2020-05-10 10:28:00 +02:00
video video: fbdev: pvr2fb: initialize variables 2020-11-10 10:23:53 +01:00
virt drivers/virt/fsl_hypervisor: Fix error handling path 2020-10-29 09:05:35 +01:00
virtio virtio_ring: Avoid loop when vq is broken in virtqueue_poll 2020-08-26 10:29:05 +02:00
vlynq
vme vme: bridges: reduce stack usage 2020-02-28 15:42:33 +01:00
w1 w1: mxc_w1: Fix timeout resolution problem leading to bus error 2020-11-10 10:23:57 +01:00
watchdog drivers: watchdog: rdc321x_wdt: Fix race condition bugs 2020-11-10 10:23:54 +01:00
xen xen/xenbus: Fix granting of vmalloc'd memory 2020-09-12 11:47:32 +02:00
zorro
Kconfig
Makefile