Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid

Pull HID fix from Jiri Kosina:
"hiddev ioctl() validation fix from Scott Bauer"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
HID: hiddev: validate num_values for HIDIOCGUSAGES, HIDIOCSUSAGES commands

+5 -5
+5 -5
drivers/hid/usbhid/hiddev.c
··· 516 516 goto inval; 517 517 } else if (uref->usage_index >= field->report_count) 518 518 goto inval; 519 - 520 - else if ((cmd == HIDIOCGUSAGES || cmd == HIDIOCSUSAGES) && 521 - (uref_multi->num_values > HID_MAX_MULTI_USAGES || 522 - uref->usage_index + uref_multi->num_values > field->report_count)) 523 - goto inval; 524 519 } 520 + 521 + if ((cmd == HIDIOCGUSAGES || cmd == HIDIOCSUSAGES) && 522 + (uref_multi->num_values > HID_MAX_MULTI_USAGES || 523 + uref->usage_index + uref_multi->num_values > field->report_count)) 524 + goto inval; 525 525 526 526 switch (cmd) { 527 527 case HIDIOCGUSAGE: