linux/drivers/media
Ricardo Ribalda daaea1706d 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:31:01 +02:00
..
cec media: rainshadow-cec: fix TOCTOU race condition in rain_interrupt() 2025-08-28 16:31:01 +02:00
common media: videobuf2: use sgtable-based scatterlist wrappers 2025-06-27 11:11:18 +01:00
dvb-core media: dvbdev: fix the logic when DVB_DYNAMIC_MINORS is not set 2024-11-06 22:32:52 +01:00
dvb-frontends media: dvb-frontends: w7090p: fix null-ptr-deref in w7090p_tuner_write_serpar and w7090p_tuner_read_serpar 2025-08-20 18:30:45 +02:00
firewire media: firewire: firedtv-avc.c: replace BUG with proper, error return 2023-08-10 07:58:37 +02:00
i2c media: mt9m114: Fix deadlock in get_frame_interval/set_frame_interval 2025-08-28 16:31:01 +02:00
mc [tree-wide] finally take no_llseek out 2024-09-27 08:18:43 -07:00
mmc media: mmc: siano: simplify module initialization 2024-04-08 13:48:19 +02:00
pci media: ivsc: Fix crash at shutdown due to missing mei_cldev_disable() calls 2025-08-28 16:31:01 +02:00
platform media: venus: venc: Clamp param smaller than 1fps and bigger than 240 2025-08-28 16:31:01 +02:00
radio media: wl128x: Fix atomicity violation in fmc_send_cmd() 2024-12-05 14:02:56 +01:00
rc media: streamzap: prevent processing IR data on URB failure 2025-04-20 10:15:35 +02:00
spi media: gs1662: remove unused struct 'gs_reg_fmt_custom' 2024-05-31 13:51:16 +02:00
test-drivers media: vivid: fix wrong pixel_array control size 2025-08-28 16:31:00 +02:00
tuners move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
usb media: usbtv: Lock resolution while streaming 2025-08-28 16:31:01 +02:00
v4l2-core media: v4l2-ctrls: Don't reset handler's error in v4l2_ctrl_handler_free() 2025-08-28 16:31:01 +02:00
Kconfig media: Kconfig: Make DVB_CORE=m possible when MEDIA_SUPPORT=y 2022-12-07 17:58:46 +01:00
Makefile media: Makefiles: remove extra spaces 2022-03-12 16:59:52 +01:00