summaryrefslogtreecommitdiff
path: root/libevdev/libevdev-int.h
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2014-03-05 10:57:01 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2014-03-06 14:30:03 +1000
commit66fee1bec4c4b021e1b54adcd775cf6e2aa84869 (patch)
tree416f1f2b156f783709d516eb84a86e760220b6f3 /libevdev/libevdev-int.h
parent4ba56ac30995f85bc492b5154c40cb05e1053e57 (diff)
downloadlibevdev-66fee1bec4c4b021e1b54adcd775cf6e2aa84869.tar.gz
Cap slot values to the announced maximum
A malicious device may announce N slots but then send a slot index >= N. The slot state is almost always allocated (definitely the case in libevdev and true for most callers), so providing a slot number higher than the announced maximum is likely to lead to invalid dereferences. Don't allow that. Likewise, don't allow negative slot numbers. Note that the kernel filters these events anyway, the only way to trigger this is to change the device fd to something outside the kernel's control. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Diffstat (limited to 'libevdev/libevdev-int.h')
0 files changed, 0 insertions, 0 deletions