linux/drivers/media
Ricardo Ribalda 5005e4e6f9 media: venus: venc: Clamp param smaller than 1fps and bigger than 240
commit 417c01b92e upstream.

The driver uses "whole" fps in all its calculations (e.g. in
load_per_instance()). Those calculation expect an fps bigger than 1, and
not big enough to overflow.

Clamp the param if the user provides a value that will result in an invalid
fps.

Reported-by: Hans Verkuil <hverkuil@xs4all.nl>
Closes: https://lore.kernel.org/linux-media/f11653a7-bc49-48cd-9cdb-1659147453e4@xs4all.nl/T/#m91cd962ac942834654f94c92206e2f85ff7d97f0
Fixes: aaaa93eda6 ("[media] media: venus: venc: add video encoder files")
Cc: stable@vger.kernel.org
Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
[bod: Change "parm" to "param"]
Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2025-08-28 16:24:29 +02:00
..
cec media: rainshadow-cec: fix TOCTOU race condition in rain_interrupt() 2025-08-28 16:24:29 +02:00
common media: videobuf2: use sgtable-based scatterlist wrappers 2025-06-27 11:05:24 +01:00
dvb-core media: dvbdev: fix the logic when DVB_DYNAMIC_MINORS is not set 2024-12-14 19:50:37 +01:00
dvb-frontends media: dvb-frontends: w7090p: fix null-ptr-deref in w7090p_tuner_write_serpar and w7090p_tuner_read_serpar 2025-08-28 16:24:24 +02:00
firewire media: firewire: firedtv-avc: fix a buffer overflow in avc_ca_pmt() 2021-11-06 14:13:30 +01:00
i2c media: ov2659: Fix memory leaks in ov2659_probe() 2025-08-28 16:24:29 +02:00
mc media: mc: mark the media devnode as registered from the, start 2024-06-16 13:39:56 +02:00
mmc media updates for v5.8-rc1 2020-06-03 20:59:38 -07:00
pci media: solo6x10: replace max(a, min(b, c)) by clamp(b, a, c) 2024-09-04 13:23:31 +02:00
platform media: venus: venc: Clamp param smaller than 1fps and bigger than 240 2025-08-28 16:24:29 +02:00
radio media: wl128x: Fix atomicity violation in fmc_send_cmd() 2024-12-14 19:51:17 +01:00
rc media: streamzap: fix race between device disconnection and urb callback 2025-05-02 07:44:25 +02:00
spi media: cxd2880-spi: Fix a null pointer dereference on error handling path 2021-11-18 19:16:27 +01:00
test-drivers media: vivid: Change the siize of the composing 2025-06-27 11:05:24 +01:00
tuners Revert "media: tuners: fix error return code of hybrid_tuner_request_state()" 2024-10-17 15:11:10 +02:00
usb media: usbtv: Lock resolution while streaming 2025-08-28 16:24:29 +02:00
v4l2-core media: v4l2-ctrls: Don't reset handler's error in v4l2_ctrl_handler_free() 2025-08-28 16:24:29 +02:00
Kconfig media: correct MEDIA_TEST_SUPPORT help text 2022-01-27 11:05:20 +01:00
Makefile media: media/test_drivers: rename to test-drivers 2020-04-16 10:38:31 +02:00