]> git.baikalelectronics.ru Git - kernel.git/commit
USB: usbdevfs: sanitize flags more
authorOliver Neukum <oneukum@suse.com>
Wed, 5 Sep 2018 10:07:02 +0000 (12:07 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 20 Sep 2018 10:48:39 +0000 (12:48 +0200)
commitc5a08aa39e842a922992830febfcc5c65626c32c
treed46548b2c14c362c18dd6a0bafb6363553ff565d
parentea2c5945cc47157e54ec17c7c0909acc15a0829a
USB: usbdevfs: sanitize flags more

Requesting a ZERO_PACKET or not is sensible only for output.
In the input direction the device decides.
Likewise accepting short packets makes sense only for input.

This allows operation with panic_on_warn without opening up
a local DOS.

Signed-off-by: Oliver Neukum <oneukum@suse.com>
Reported-by: syzbot+843efa30c8821bd69f53@syzkaller.appspotmail.com
Fixes: a6e71f2e88a3 ("USB: debugging code shouldn't alter control flow")
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/core/devio.c