WSL2-Linux-Kernel/drivers
Dan Carpenter fdc977f2e7 dmaengine: at_xdmac: fix potential Oops in at_xdmac_prep_interleaved()
[ Upstream commit 4d43acb145 ]

There are two place if the at_xdmac_interleaved_queue_desc() fails which
could lead to a NULL dereference where "first" is NULL and we call
list_add_tail(&first->desc_node, ...).  In the first caller, the return
is not checked so add a check for that.  In the next caller, the return
is checked but if it fails on the first iteration through the loop then
it will lead to a NULL pointer dereference.

Fixes: 4e5385784e ("dmaengine: at_xdmac: handle numf > 1")
Fixes: 62b5cb757f ("dmaengine: at_xdmac: fix memory leak in interleaved mode")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Tudor Ambarus <tudor.ambarus@linaro.org>
Link: https://lore.kernel.org/r/21282b66-9860-410a-83df-39c17fcf2f1b@kili.mountain
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-06-09 10:32:15 +02:00
..
accessibility
acpi ACPICA: ACPICA: check null return of ACPI_ALLOCATE_ZEROED in acpi_db_display_objects 2023-05-24 17:36:44 +01:00
amba
android binder: fix UAF of alloc->vma in race with munmap() 2023-06-05 09:21:25 +02:00
ata
atm atm: idt77252: fix kmemleak when rmmod idt77252 2023-03-30 12:47:48 +02:00
auxdisplay
base regmap: cache: Return error in cache sync operations for REGCACHE_NONE 2023-05-24 17:36:43 +01:00
bcma
block nbd: fix incomplete validation of ioctl arg 2023-05-24 17:36:46 +01:00
bluetooth Bluetooth: hci_bcm: Fall back to getting bdaddr from EFI if not set 2023-05-24 17:36:46 +01:00
bus bus: mhi: host: Range check CHDBOFF and ERDBOFF 2023-05-17 11:50:14 +02:00
cdrom
char tpm/tpm_tis: Disable interrupts for more Lenovo devices 2023-05-24 17:36:55 +01:00
clk clk: tegra20: fix gcc-7 constant overflow warning 2023-05-24 17:36:47 +01:00
clocksource clocksource/drivers/davinci: Fix memory leak in davinci_timer_register when init fails 2023-05-11 23:00:37 +09:00
comedi
connector
counter counter: 104-quad-8: Fix race condition between FLAG and CNTR reads 2023-04-26 13:51:55 +02:00
cpufreq cpufreq: use correct unit when verify cur freq 2023-05-11 23:00:25 +09:00
cpuidle cpuidle: psci: Iterate backwards over list in psci_pd_remove() 2023-03-22 13:31:36 +01:00
crypto crypto: sun8i-ss - Fix a test in sun8i_ss_setup_ivs() 2023-05-17 11:50:20 +02:00
cxl
dax
dca
devfreq
dio
dma dmaengine: at_xdmac: fix potential Oops in at_xdmac_prep_interleaved() 2023-06-09 10:32:15 +02:00
dma-buf
edac EDAC/skx: Fix overflows on the DRAM row address mapping arrays 2023-05-11 23:00:20 +09:00
eisa
extcon
firewire
firmware firmware: arm_ffa: Set reserved/MBZ fields to zero in the memory descriptors 2023-05-30 13:55:33 +01:00
fpga fpga: bridge: fix kernel-doc parameter description 2023-05-11 23:00:31 +09:00
fsi
gnss
gpio gpio: mockup: Fix mode of debugfs files 2023-05-30 13:55:30 +01:00
gpu drm/exynos: fix g2d_open/close helper function definitions 2023-05-24 17:36:51 +01:00
greybus
hid HID: wacom: add three styli to wacom_intuos_get_tool_type 2023-05-24 17:36:55 +01:00
hsi
hv Drivers: vmbus: Check for channel allocation before looking up relids 2023-04-13 16:48:17 +02:00
hwmon hwmon: (pmbus/fsp-3y) Fix functionality bitmask in FSP-3Y YM-2151E 2023-05-11 23:00:25 +09:00
hwspinlock
hwtracing coresight: Fix signedness bug in tmc_etr_buf_insert_barrier_packet() 2023-05-30 13:55:32 +01:00
i2c i2c: cadence: cdns_i2c_master_xfer(): Fix runtime PM leak on error path 2023-05-11 23:00:33 +09:00
i3c
idle
iio iio: light: max44009: add missing OF device matching 2023-05-11 23:00:32 +09:00
infiniband RDMA/hns: Modify the value of long message loopback slice 2023-06-09 10:32:14 +02:00
input Input: xpad - add constants for GIP interface numbers 2023-05-24 17:36:48 +01:00
interconnect interconnect: qcom: osm-l3: fix icc_onecell_data allocation 2023-03-30 12:47:41 +02:00
iommu iommu/sprd: Release dma buffer to avoid memory leak 2023-05-24 17:36:48 +01:00
ipack
irqchip irqchip/mips-gic: Don't touch vl_map if a local interrupt is not routable 2023-06-05 09:21:23 +02:00
isdn
leds leds: tca6507: Fix error handling of using fwnode_property_read_string 2023-05-11 23:00:37 +09:00
macintosh macintosh: via-pmu-led: requires ATA to be set 2023-05-11 23:00:34 +09:00
mailbox mailbox: zynqmp: Fix counts of child nodes 2023-05-17 11:50:14 +02:00
mcb mcb-pci: Reallocate memory region to avoid memory overlapping 2023-05-24 17:36:47 +01:00
md dm: don't lock fs when the map is NULL in process of resume 2023-05-11 23:00:40 +09:00
media media: radio-shark: Add endpoint checks 2023-05-30 13:55:31 +01:00
memory
memstick memstick: r592: Fix UAF bug in r592_remove due to race condition 2023-05-24 17:36:43 +01:00
message scsi: message: mptlan: Fix use after free bug in mptlan_remove() due to race condition 2023-05-24 17:36:45 +01:00
mfd mfd: dln2: Fix memory leak in dln2_probe() 2023-05-24 17:36:48 +01:00
misc vmci_host: fix a race condition in vmci_host_poll() causing GPF 2023-05-11 23:00:32 +09:00
mmc mmc: sdhci-esdhc-imx: make "no-mmc-hs400" works 2023-05-30 13:55:30 +01:00
most
mtd mtd: core: fix error path for nvmem provider 2023-05-11 23:00:39 +09:00
mux
net net/mlx5e: Fix SQ wake logic in ptp napi_poll context 2023-06-05 09:21:21 +02:00
nfc nfc: st-nci: Fix use after free bug in ndlc_remove due to race condition 2023-03-22 13:31:26 +01:00
ntb
nubus
nvdimm
nvme nvme-fcloop: fix "inconsistent {IN-HARDIRQ-W} -> {HARDIRQ-ON-W} usage" 2023-05-11 23:00:28 +09:00
nvmem
of of: Fix modalias string generation 2023-05-11 23:00:32 +09:00
opp
parisc parisc: Replace regular spinlock with spin_trylock on panic path 2023-05-24 17:36:48 +01:00
parport
pci PCI/EDR: Clear Device Status after EDR error recovery 2023-05-11 23:00:32 +09:00
pcmcia
perf
phy phy: st: miphy28lp: use _poll_timeout functions for waits 2023-05-24 17:36:48 +01:00
pinctrl pinctrl: renesas: r8a779a0: Remove incorrect AVB[01] pinmux configuration 2023-05-11 23:00:37 +09:00
platform platform/x86: ISST: Remove 8 socket limit 2023-06-05 09:21:16 +02:00
pnp
power power: supply: bq24190: Call power_supply_changed() after updating input current 2023-06-05 09:21:13 +02:00
powercap
pps
ps3
ptp ptp_qoriq: fix memory leak in probe() 2023-04-05 11:24:55 +02:00
pwm pwm: mtk-disp: Configure double buffering before reading in .get_state() 2023-05-11 23:00:38 +09:00
rapidio
ras
regulator regulator: mt6359: add read check for PMIC MT6359 2023-05-30 13:55:33 +01:00
remoteproc remoteproc: stm32_rproc: Add mutex protection for workqueue 2023-05-24 17:36:44 +01:00
reset
rpmsg
rtc rtc: meson-vrtc: Use ktime_get_real_ts64() to get the current time 2023-05-11 23:00:35 +09:00
s390 s390/qdio: fix do_sqbs() inline assembly constraint 2023-05-24 17:36:55 +01:00
sbus
scsi scsi: storvsc: Don't pass unused PFNs to Hyper-V host 2023-05-24 17:36:52 +01:00
sh
siox
slimbus
soc soc: ti: pm33xx: Fix refcount leak in am33xx_pm_probe 2023-05-11 23:00:20 +09:00
soundwire soundwire: qcom: gracefully handle too many ports in DT 2023-05-24 17:36:48 +01:00
spi spi: fsl-cpm: Use 16 bit mode for large transfers with even size 2023-05-30 13:55:29 +01:00
spmi spmi: Add a check for remove callback when removing a SPMI driver 2023-05-11 23:00:34 +09:00
ssb
staging staging: rtl8192e: Replace macro RTL_PCI_DEVICE with PCI_DEVICE 2023-05-24 17:36:46 +01:00
target scsi: target: iscsit: Free cmds before session free 2023-05-24 17:36:45 +01:00
tc
tee tee: amdtee: fix race condition in amdtee_open_session 2023-03-30 12:47:59 +02:00
thermal thermal/drivers/mediatek: Use devm_of_iomap to avoid resource leak in mtk_thermal_probe 2023-05-11 23:00:38 +09:00
thunderbolt thunderbolt: Clear registers properly when auto clear isn't in use 2023-05-24 17:36:54 +01:00
tty vc_screen: reload load of struct vc_data pointer in vcs_write() to avoid UAF 2023-05-24 17:36:54 +01:00
uio
usb USB: sisusbvga: Add endpoint checks 2023-05-30 13:55:31 +01:00
vdpa vdpa_sim: set last_used_idx as last_avail_idx in vdpasim_queue_ready 2023-03-22 13:31:24 +01:00
vfio
vhost
video fbdev: udlfb: Fix endpoint check 2023-05-30 13:55:31 +01:00
virt
virtio virtio_ring: don't update event idx on get_buf 2023-05-11 23:00:34 +09:00
visorbus
vlynq
vme
w1
watchdog watchdog: sp5100_tco: Immediately trigger upon starting. 2023-05-30 13:55:29 +01:00
xen xen/pvcalls-back: fix double frees with pvcalls_new_active_socket() 2023-05-30 13:55:32 +01:00
zorro
Kconfig
Makefile