linux-stable/drivers/media
Sean Young 647d446d66 media, bpf: Do not copy more entries than user space requested
The syscall bpf(BPF_PROG_QUERY, &attr) should use the prog_cnt field to
see how many entries user space provided and return ENOSPC if there are
more programs than that. Before this patch, this is not checked and
ENOSPC is never returned.

Note that one lirc device is limited to 64 bpf programs, and user space
I'm aware of -- ir-keytable -- always gives enough space for 64 entries
already. However, we should not copy program ids than are requested.

Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20210623213754.632-1-sean@mess.org
2021-06-24 15:16:40 +02:00
..
cec media: cec/core: clarify rx-arb-lost usage message 2021-04-06 16:08:38 +02:00
common media: flexcop: avoid -Wempty-body warning 2021-04-09 13:05:01 +02:00
dvb-core media: dvbdev: Fix memory leak in dvb_media_device_free() 2021-03-22 23:36:39 +01:00
dvb-frontends media: dvb: Add check on sp8870_readreg return 2021-05-13 18:32:41 +02:00
firewire module: remove never implemented MODULE_SUPPORTED_DEVICE 2021-03-17 13:16:18 -07:00
i2c media: adv7842: support 1 block EDIDs, fix clearing EDID 2021-04-09 13:18:05 +02:00
mc media: entity: Add lockdep check to media graph walk 2021-04-06 14:35:14 +02:00
mmc media updates for v5.8-rc1 2020-06-03 20:59:38 -07:00
pci media updates for v5.13-rc1 2021-04-28 09:24:36 -07:00
platform Revert "media: rcar_drif: fix a memory disclosure" 2021-05-13 17:29:55 +02:00
radio media: radio-si476x: rectify spelling and grammar 2021-03-22 11:58:42 +01:00
rc media, bpf: Do not copy more entries than user space requested 2021-06-24 15:16:40 +02:00
spi media: use getter/setter functions 2021-03-11 11:59:42 +01:00
test-drivers media: vivid: add read-only int32 control 2021-04-06 16:04:24 +02:00
tuners media: m88rs6000t: avoid potential out-of-bounds reads on arrays 2021-03-22 17:41:39 +01:00
usb media: gspca: properly check for errors in po1030_probe() 2021-05-13 18:58:32 +02:00
v4l2-core drm for 5.13-rc1 2021-04-28 10:01:40 -07: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