media: rc: read out of bounds if bpf reports high protocol number
authorSean Young <sean@mess.org>
Sat, 28 Jul 2018 09:11:15 +0000 (05:11 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Mon, 30 Jul 2018 12:19:53 +0000 (08:19 -0400)
commitf5dbee6e3881b1dbfdcc36008d48bd29549ab2f4
tree0c40f47cfe5fd713d664009851b11b0439f094ad
parent92cab799bbc6fa1fca84bd1692285a5f926c17e9
media: rc: read out of bounds if bpf reports high protocol number

The repeat period is read from a static array. If a keydown event is
reported from bpf with a high protocol number, we read out of bounds. This
is unlikely to end up with a reasonable repeat period at the best of times,
in which case no timely key up event is generated.

Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/rc/rc-main.c