linux-stable/drivers/comedi/drivers
Johan Hovold 536de747bc comedi: dt9812: fix DMA buffers on stack
USB transfer buffers are typically mapped for DMA and must not be
allocated on the stack or transfers will fail.

Allocate proper transfer buffers in the various command helpers and
return an error on short transfers instead of acting on random stack
data.

Note that this also fixes a stack info leak on systems where DMA is not
used as 32 bytes are always sent to the device regardless of how short
the command is.

Fixes: 63274cd7d3 ("Staging: comedi: add usb dt9812 driver")
Cc: stable@vger.kernel.org      # 2.6.29
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://lore.kernel.org/r/20211027093529.30896-3-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-10-30 10:54:47 +02:00
..
ni_routing
tests
8255.c
8255.h
8255_pci.c
addi_apci_3xxx.c
addi_apci_16xx.c
addi_apci_1032.c
addi_apci_1500.c
addi_apci_1516.c
addi_apci_1564.c
addi_apci_2032.c
addi_apci_2200.c
addi_apci_3120.c
addi_apci_3501.c
addi_tcw.h
addi_watchdog.c
addi_watchdog.h
adl_pci7x3x.c
adl_pci6208.c
adl_pci8164.c
adl_pci9111.c
adl_pci9118.c
adq12b.c
adv_pci1710.c
adv_pci1720.c
adv_pci1723.c
adv_pci1724.c
adv_pci1760.c
adv_pci_dio.c
aio_aio12_8.c
aio_iiro_16.c
amcc_s5933.h
amplc_dio200.c
amplc_dio200.h
amplc_dio200_common.c
amplc_dio200_pci.c
amplc_pc236.c
amplc_pc236.h
amplc_pc236_common.c
amplc_pc263.c
amplc_pci224.c
amplc_pci230.c
amplc_pci236.c
amplc_pci263.c
c6xdigio.c
cb_das16_cs.c
cb_pcidas.c
cb_pcidas64.c
cb_pcidda.c
cb_pcimdas.c
cb_pcimdda.c
comedi_8254.c comedi: comedi_8254: Fix descriptions for 'i8254' and 'iobase' 2021-05-21 14:38:44 +02:00
comedi_8254.h
comedi_8255.c
comedi_bond.c
comedi_isadma.c comedi: drivers: comedi_isadma: Fix misspelling of 'dma_chan1' 2021-05-21 14:38:44 +02:00
comedi_isadma.h
comedi_parport.c
comedi_test.c
contec_pci_dio.c
dac02.c
daqboard2000.c
das08.c
das08.h
das08_cs.c
das08_isa.c
das08_pci.c
das16.c
das16m1.c
das800.c
das1800.c
das6402.c
dmm32at.c
dt282x.c
dt2801.c
dt2811.c
dt2814.c
dt2815.c
dt2817.c
dt3000.c
dt9812.c comedi: dt9812: fix DMA buffers on stack 2021-10-30 10:54:47 +02:00
dyna_pci10xx.c
fl512.c
gsc_hpdi.c
icp_multi.c
ii_pci20kc.c
jr3_pci.c staging: comedi: Remove unused variable ‘min_full_scale’ and function 'get_min_full_scales' 2021-05-19 18:00:24 +02:00
jr3_pci.h
ke_counter.c
Makefile
me4000.c
me_daq.c
mf6x4.c
mite.c
mite.h
mpc624.c
multiq3.c
ni_65xx.c
ni_660x.c
ni_670x.c
ni_6527.c
ni_at_a2150.c
ni_at_ao.c
ni_atmio.c
ni_atmio16d.c
ni_daq_700.c
ni_daq_dio24.c
ni_labpc.c
ni_labpc.h
ni_labpc_common.c
ni_labpc_cs.c
ni_labpc_isadma.c
ni_labpc_isadma.h
ni_labpc_pci.c
ni_labpc_regs.h
ni_mio_common.c
ni_mio_cs.c
ni_pcidio.c
ni_pcimio.c
ni_routes.c comedi: drivers: ni_routes: Demote non-conforming kernel-doc headers 2021-05-21 14:38:44 +02:00
ni_routes.h
ni_stc.h
ni_tio.c comedi: drivers: ni_tio: Fix slightly broken kernel-doc and demote others 2021-05-21 14:38:44 +02:00
ni_tio.h
ni_tio_internal.h
ni_tiocmd.c
ni_usb6501.c comedi: ni_usb6501: fix NULL-deref in command paths 2021-10-30 10:54:47 +02:00
pcl711.c
pcl724.c
pcl726.c
pcl730.c
pcl812.c
pcl816.c
pcl818.c
pcm3724.c
pcmad.c
pcmda12.c
pcmmio.c
pcmuio.c
plx9052.h
plx9080.h
quatech_daqp_cs.c
rtd520.c
rti800.c
rti802.c
s526.c
s626.c
s626.h
ssv_dnp.c
usbdux.c
usbduxfast.c
usbduxsigma.c
vmk80xx.c comedi: vmk80xx: fix bulk and interrupt message timeouts 2021-10-26 19:10:19 +02:00
z8536.h