Up to [local] / src / usr.bin / usbhidctl
Request diff between arbitrary revisions
Default branch: MAIN
Current tag: OPENBSD_6_9_BASE
Revision 1.16 / (download) - annotate - [select for diffs], Thu Feb 4 06:57:19 2021 UTC (3 years, 4 months ago) by anton
Branch: MAIN
CVS Tags: OPENBSD_6_9_BASE,
OPENBSD_6_9
Changes since 1.15: +2 -8 lines
Diff to previous 1.15 (colored)
Unconditionally allocate a buffer big enough to hold a struct usb_ctl_report. Limiting the size of the buffer to the size of the requested report can cause the ioctl(USB_GET_REPORT) command to fail with EFAULT as the kernel will always copy sizeof(struct usb_ctl_report) bytes from the address passed from user space. That is when the given address + sizeof(struct usb_ctl_report) crosses a page boundary and the adjacent page is not mapped. ok mglocker@