diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2020-10-30 14:52:30 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2020-11-17 08:57:10 +0300 |
commit | 72e637fec558c7842d6f1508f480fd77c20afe3a (patch) | |
tree | 0de9489d6a86cb822a8e054fc98c0b5e05b1fa25 /include/uapi/linux/lirc.h | |
parent | 7399139be6b21c7c59323a4fab56cc07cd254529 (diff) | |
download | linux-72e637fec558c7842d6f1508f480fd77c20afe3a.tar.xz |
media: rc: validate that "rc_proto" is reasonable
Smatch complains that "rc_proto" comes from the user and it can result
in shift wrapping in ir_raw_encode_scancode()
drivers/media/rc/rc-ir-raw.c:526 ir_raw_encode_scancode()
error: undefined (user controlled) shift '1 << protocol'
This is true, but I reviewed the surrounding code and it appears
harmless. Anyway, let's verify that "rc_proto" is valid as a kernel
hardening measure.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'include/uapi/linux/lirc.h')
-rw-r--r-- | include/uapi/linux/lirc.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/uapi/linux/lirc.h b/include/uapi/linux/lirc.h index f99d9dcae667..c1eb960adde3 100644 --- a/include/uapi/linux/lirc.h +++ b/include/uapi/linux/lirc.h @@ -226,6 +226,7 @@ enum rc_proto { RC_PROTO_RCMM24 = 25, RC_PROTO_RCMM32 = 26, RC_PROTO_XBOX_DVD = 27, + RC_PROTO_MAX = RC_PROTO_XBOX_DVD, }; #endif |