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.
Showing the changes to include/uapi/linux (1 of 2 files). Show all
Unified · Split
| @@ -226,6 +226,7 @@ enum rc_proto { · 225 unmodified lines | ||
| 226 | 226 | RC_PROTO_RCMM24 = 25, |
| 227 | 227 | RC_PROTO_RCMM32 = 26, |
| 228 | 228 | RC_PROTO_XBOX_DVD = 27, |
| 229 | + RC_PROTO_MAX = RC_PROTO_XBOX_DVD, | |
| 229 | 230 | }; |
| 230 | 231 | |
| 231 | 232 | #endif |