]> Git Repo - linux.git/commit
USB: fix linked-list corruption in rh_call_control()
authorAlan Stern <[email protected]>
Fri, 24 Mar 2017 17:38:28 +0000 (13:38 -0400)
committerGreg Kroah-Hartman <[email protected]>
Mon, 27 Mar 2017 07:24:13 +0000 (09:24 +0200)
commit1633682053a7ee8058e10c76722b9b28e97fb73f
tree7d62e7f9b7cb9f51e15063a6a51cf20642237f91
parentc02ed2e75ef4c74e41e421acb4ef1494671585e8
USB: fix linked-list corruption in rh_call_control()

Using KASAN, Dmitry found a bug in the rh_call_control() routine: If
buffer allocation fails, the routine returns immediately without
unlinking its URB from the control endpoint, eventually leading to
linked-list corruption.

This patch fixes the problem by jumping to the end of the routine
(where the URB is unlinked) when an allocation failure occurs.

Signed-off-by: Alan Stern <[email protected]>
Reported-and-tested-by: Dmitry Vyukov <[email protected]>
CC: <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
drivers/usb/core/hcd.c
This page took 0.053377 seconds and 4 git commands to generate.