[PATCH 1/4] usbip: fix stub_rx: get_pipe() to validate endpoint number

2017-12-07 Thread Shuah Khan
get_pipe() routine doesn't validate the input endpoint number and uses to reference ep_in and ep_out arrays. Invalid endpoint number can trigger BUG(). Range check the epnum and returning error instead of calling BUG(). Change caller stub_recv_cmd_submit() to handle the get_pipe() error return.

[PATCH 1/4] usbip: fix stub_rx: get_pipe() to validate endpoint number

2017-12-07 Thread Shuah Khan
get_pipe() routine doesn't validate the input endpoint number and uses to reference ep_in and ep_out arrays. Invalid endpoint number can trigger BUG(). Range check the epnum and returning error instead of calling BUG(). Change caller stub_recv_cmd_submit() to handle the get_pipe() error return.