linux-kernelorg-stable/drivers
Bjorn Andersson fa725a427d soc: qcom: mdt_loader: Deal with zero e_shentsize
commit 25daf9af0a upstream.

Firmware that doesn't provide section headers leave both e_shentsize and
e_shnum 0, which obvious isn't compatible with the newly introduced
stricter checks.

Make the section-related checks conditional on either of these values
being non-zero.

Fixes: 9f9967fed9 ("soc: qcom: mdt_loader: Ensure we don't read past the ELF header")
Reported-by: Val Packett <val@packett.cool>
Closes: https://lore.kernel.org/all/ece307c3-7d65-440f-babd-88cf9705b908@packett.cool/
Reported-by: Neil Armstrong <neil.armstrong@linaro.org>
Closes: https://lore.kernel.org/all/aec9cd03-6fc2-4dc8-b937-8b7cf7bf4128@linaro.org/
Signed-off-by: Bjorn Andersson <bjorn.andersson@oss.qualcomm.com>
Fixes: 9f35ab0e53 ("soc: qcom: mdt_loader: Fix error return values in mdt_header_valid()")
Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8650-QRD
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20250730-mdt-loader-shentsize-zero-v1-1-04f43186229c@oss.qualcomm.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Cc: Yongqin Liu <yongqin.liu@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-09-19 16:30:00 +02:00
..
accessibility
acpi
amba
android
ata
atm
auxdisplay
base x86/vmscape: Enable the mitigation 2025-09-11 17:19:15 +02:00
bcma
block
bluetooth
bus
cdrom
char
clk
clocksource
comedi
connector
counter
cpufreq cpufreq: intel_pstate: Check turbo_is_disabled() in store_no_turbo() 2025-09-09 18:54:25 +02:00
cpuidle
crypto
cxl
dax
dca
devfreq
dio
dma dmaengine: dw: dmamux: Fix device reference leak in rzn1_dmamux_route_allocate 2025-09-19 16:29:59 +02:00
dma-buf
edac EDAC/altera: Delete an inappropriate dma_free_coherent() call 2025-09-19 16:29:56 +02:00
eisa
extcon
firewire
firmware
fpga
fsi
gnss
gpio
gpu drm/i915/power: fix size for for_each_set_bit() in abox iteration 2025-09-19 16:30:00 +02:00
greybus
hid
hsi
hte
hv
hwmon hwmon: mlxreg-fan: Prevent fans from getting stuck at 0 RPM 2025-09-09 18:54:22 +02:00
hwspinlock
hwtracing
i2c
i3c
idle
iio
infiniband
input Input: i8042 - add TUXEDO InfinityBook Pro Gen10 AMD to i8042 quirk table 2025-09-19 16:29:57 +02:00
interconnect
iommu
ipack
irqchip
isdn
leds
macintosh
mailbox
mcb
md
media media: i2c: imx214: Fix link frequency validation 2025-09-19 16:29:55 +02:00
memory
memstick
message
mfd
misc
mmc
most
mtd mtd: nand: raw: atmel: Respect tAR, tCLR in read setup timing 2025-09-19 16:29:57 +02:00
mux
net can: xilinx_can: xcan_write_frame(): fix use-after-free of transmitted SKB 2025-09-19 16:29:58 +02:00
nfc
ntb
nubus
nvdimm
nvme
nvmem
of
opp
parisc
parport
pci
pcmcia pcmcia: Add error handling for add_interval() in do_validate_mem() 2025-09-09 18:54:22 +02:00
peci
perf
phy phy: ti-pipe3: fix device leak at unbind 2025-09-19 16:30:00 +02:00
pinctrl
platform
pnp
power
powercap
pps
ps3
ptp
pwm
rapidio
ras
regulator regulator: sy7636a: fix lifecycle of power good gpio 2025-09-19 16:29:59 +02:00
remoteproc
reset
rpmsg
rtc
s390
sbus
scsi
sh
siox
slimbus
soc soc: qcom: mdt_loader: Deal with zero e_shentsize 2025-09-19 16:30:00 +02:00
soundwire
spi spi: tegra114: Use value to check for invalid delays 2025-09-09 18:54:24 +02:00
spmi
ssb
staging
target
tc
tee
thermal
thunderbolt
tty serial: sc16is7xx: fix bug in flow control levels init 2025-09-19 16:29:58 +02:00
ufs
uio
usb USB: gadget: dummy-hcd: Fix locking bug in RT-enabled kernels 2025-09-19 16:29:59 +02:00
vdpa
vfio
vhost
video
virt
virtio
vlynq
w1
watchdog
xen
zorro
Kconfig
Makefile