linux/drivers/media
Mauro Carvalho Chehab 60f0618d15 media: dvb-core: frontend: make GET/SET safer
The implementation for FE_SET_PROPERTY/FE_GET_PROPERTY has
a debug code that might be explored via spectre.
Improve the logic in order to mitigate such risk.

It should be noticed that, before this patch, the logic
which implements FE_GET_PROPERTY doesn't check the length passed
by the user, which might lead to expose some information. This
is probably not exploitable, though, as the frontend drivers
won't rely on the buffer length value set by userspace, but
it helps to return a valid value back to userspace.

The code was changed to only try to access an array based on
userspace values only when DVB debug is turned on, helping to
reduce the attack surface, as a speculation attack would work
only if DVB dev_dbg() macros are enabled, which is usually
enabled only on test Kernels or by the root user.

As a side effect, a const array size can now be reduced by
~570 bytes, as it now needs to contain just the name of each
DTV command.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-06-17 09:29:11 +02:00
..
cec media: s5p: fix pm_runtime_get_sync() usage count 2021-05-10 11:36:33 +02:00
common media: siano: fix device register error path 2021-06-17 09:27:08 +02:00
dvb-core media: dvb-core: frontend: make GET/SET safer 2021-06-17 09:29:11 +02:00
dvb-frontends media: mxl692: make a const array static, makes object smaller 2021-06-08 15:50:38 +02:00
firewire module: remove never implemented MODULE_SUPPORTED_DEVICE 2021-03-17 13:16:18 -07:00
i2c media: tc358743: Fix error return code in tc358743_probe_of() 2021-06-02 13:31:39 +02:00
mc media: mc-request.c: allow object_bind in QUEUED state 2021-06-02 11:41:54 +02:00
mmc media updates for v5.8-rc1 2020-06-03 20:59:38 -07:00
pci media: saa7134: fix saa7134_initdev error handling logic 2021-06-17 09:26:42 +02:00
platform media: sun6i-csi: add a missing return code 2021-06-17 09:25:48 +02:00
radio media: radio: si4713: constify static struct v4l2_ioctl_ops 2021-06-02 13:26:11 +02:00
rc media: imon: use DEVICE_ATTR_RW() helper macro 2021-06-08 15:57:51 +02:00
spi media: cxd2880-spi: Fix some error messages 2021-06-08 15:51:35 +02:00
test-drivers media: vivid: use vb2_queue_change_type 2021-06-08 12:06:55 +02:00
tuners media: m88rs6000t: avoid potential out-of-bounds reads on arrays 2021-03-22 17:41:39 +01:00
usb media: ttusb-dec: cleanup an error handling logic 2021-06-17 09:27:34 +02:00
v4l2-core media: hevc: Add decode params control 2021-06-08 16:04:27 +02:00
Kconfig media: Correct 'so' 2021-03-22 11:52:09 +01:00
Makefile media: media/test_drivers: rename to test-drivers 2020-04-16 10:38:31 +02:00