android_kernel_motorola_sm6375/drivers/media
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Vikash Garodia 45e1a910b6 FROMGIT: media: venus: hfi: add check to handle incorrect queue size
qsize represents size of shared queued between driver and video
firmware. Firmware can modify this value to an invalid large value. In
such situation, empty_space will be bigger than the space actually
available. Since new_wr_idx is not checked, so the following code will
result in an OOB write.
...
qsize = qhdr->q_size

if (wr_idx >= rd_idx)
 empty_space = qsize - (wr_idx - rd_idx)
....
if (new_wr_idx < qsize) {
 memcpy(wr_ptr, packet, dwords << 2) --> OOB write

Add check to ensure qsize is within the allocated size while
reading and writing packets into the queue.

Cc: stable@vger.kernel.org
Fixes: d96d3f30c0 ("[media] media: venus: hfi: add Venus HFI files")
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
CRs-Fixed: 3935673
Change-Id: Ifb907d4a4c82f853081492e06e68180476367ed5
Git-commit: 69baf245b23e20efda0079238b27fc63ecf13de1
Git-repo: https://gitlab.freedesktop.org/linux-media/media-committers.git
Signed-off-by: Vikash Garodia <quic_vgarodia@quicinc.com>
2025-03-17 02:10:51 -07:00
..
cec media: cec: cec-api: add locking in cec_release() 2024-06-16 13:28:44 +02:00
common Merge 5.4.273 into android11-5.4-lts 2024-04-16 15:17:08 +00:00
dvb-core media: dvbdev: Initialize sbuf 2024-07-05 09:08:28 +02:00
dvb-frontends media: dvb-frontends: tda10048: Fix integer overflow 2024-07-18 11:40:49 +02:00
firewire
i2c Merge 5.4.273 into android11-5.4-lts 2024-04-16 15:17:08 +00:00
mc media: mc: mark the media devnode as registered from the, start 2024-06-16 13:28:50 +02:00
mmc
pci This is the 5.4.278 stable release 2024-06-18 14:18:49 +00:00
platform FROMGIT: media: venus: hfi: add check to handle incorrect queue size 2025-03-17 02:10:51 -07:00
radio Merge android11-5.4.278(7453ecf) into msm-5.4 2024-10-15 16:13:40 +05:30
rc This is the 5.4.262 stable release 2023-11-29 10:18:14 +00:00
spi
tuners Merge 5.4.274 into android11-5.4-lts 2024-04-18 07:23:10 +00:00
usb This is the 5.4.280 stable release 2024-07-19 13:19:29 +00:00
v4l2-core This is the 5.4.278 stable release 2024-06-18 14:18:49 +00:00
Kconfig
Makefile