alistair23-linux/drivers/staging
Ian Abbott af4b54a2e5 staging: comedi: ni_usb6501: Fix possible double-free of ->usb_rx_buf
`ni6501_alloc_usb_buffers()` is called from `ni6501_auto_attach()` to
allocate RX and TX buffers for USB transfers.  It allocates
`devpriv->usb_rx_buf` followed by `devpriv->usb_tx_buf`.  If the
allocation of `devpriv->usb_tx_buf` fails, it frees
`devpriv->usb_rx_buf`, leaving the pointer set dangling, and returns an
error.  Later, `ni6501_detach()` will be called from the core comedi
module code to clean up.  `ni6501_detach()` also frees both
`devpriv->usb_rx_buf` and `devpriv->usb_tx_buf`, but
`devpriv->usb_rx_buf` may have already beed freed, leading to a
double-free error.  Fix it bu removing the call to
`kfree(devpriv->usb_rx_buf)` from `ni6501_alloc_usb_buffers()`, relying
on `ni6501_detach()` to free the memory.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-17 11:59:24 +02:00
..
android
axis-fifo staging: axis-fifo: add CONFIG_OF dependency 2019-03-18 07:57:58 +01:00
board
clocking-wizard
comedi staging: comedi: ni_usb6501: Fix possible double-free of ->usb_rx_buf 2019-04-17 11:59:24 +02:00
emxx_udc
erofs staging: erofs: fix unexpected out-of-bound data access 2019-04-16 13:56:20 +02:00
fbtft
fsl-dpaa2 Staging/IIO patches for 5.1-rc1 2019-03-06 16:29:27 -08:00
fwserial
gasket
gdm724x
goldfish
greybus
gs_fpgaboot
iio staging: iio: ad7192: Fix ad7193 channel address 2019-03-09 16:55:06 +00:00
ks7010 Staging: ks7010: Replace typecast to int 2019-03-01 09:05:01 +01:00
media media updates for v5.1-rc1 2019-03-09 14:45:54 -08:00
most staging: most: core: use device description as name 2019-04-02 20:23:07 +02:00
mt7621-dma staging: mt7621-dma: remove license boilerplate text 2019-03-03 09:25:42 +01:00
mt7621-dts staging: mt7621-dts: update ethernet settings. 2019-03-18 07:55:55 +01:00
mt7621-mmc
mt7621-pci staging, mt7621-pci: fix build without pci support 2019-03-18 07:59:04 +01:00
mt7621-pci-phy
mt7621-pinctrl
mt7621-spi
netlogic
nvec
octeon staging: octeon-ethernet: fix incorrect PHY mode 2019-03-26 05:54:18 +09:00
octeon-usb
olpc_dcon staging: olpc_dcon_xo_1: add missing 'const' qualifier 2019-03-18 07:57:58 +01:00
pi433
ralink-gdma
rtl8188eu staging: rtl8188eu: Fix potential NULL pointer dereference of kcalloc 2019-03-21 08:32:57 +01:00
rtl8192e staging: rtl8192e: Fix space and suspect issue 2019-02-28 19:14:53 +01:00
rtl8192u
rtl8712 staging: rtl8712: uninitialized memory in read_bbreg_hdl() 2019-03-21 08:32:57 +01:00
rtl8723bs staging: rtl8188eu: Fix potential NULL pointer dereference of kcalloc 2019-03-21 08:32:57 +01:00
rtlwifi staging: rtlwifi: Fix potential NULL pointer dereference of kzalloc 2019-03-21 08:32:58 +01:00
rts5208
sm750fb
speakup staging: speakup_soft: Fix alternate speech with other synths 2019-03-18 07:57:58 +01:00
unisys
vboxvideo
vc04_services staging: vc04_services: Fix an error code in vchiq_probe() 2019-03-26 05:54:18 +09:00
vme
vt6655 staging: vt6655: Remove vif check from vnt_interrupt 2019-03-29 17:25:45 +01:00
vt6656
wilc1000 staging: wilc1000: fix incorrent type in initializer 2019-02-28 08:45:28 +01:00
wlan-ng
Kconfig staging: remove mt7621-eth 2019-03-18 07:55:55 +01:00
Makefile staging: remove mt7621-eth 2019-03-18 07:55:55 +01:00