summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-09-19 19:09:51 +0100
committerJiri Slaby <jslaby@suse.cz>2016-10-07 10:54:58 +0200
commit55b6c165bdf9b2808137cc5d49066e8a5344622a (patch)
treea20c504f2444b3d1d12e76685b46fcd16fd0ab94 /kernel
parent70104af05fc8ad4f85510b8d442d0bd1886ed716 (diff)
downloadlwn-55b6c165bdf9b2808137cc5d49066e8a5344622a.tar.gz
lwn-55b6c165bdf9b2808137cc5d49066e8a5344622a.zip
usb: misc: legousbtower: Fix NULL pointer deference
commit 2fae9e5a7babada041e2e161699ade2447a01989 upstream. This patch fixes a NULL pointer dereference caused by a race codition in the probe function of the legousbtower driver. It re-structures the probe function to only register the interface after successfully reading the board's firmware ID. The probe function does not deregister the usb interface after an error receiving the devices firmware ID. The device file registered (/dev/usb/legousbtower%d) may be read/written globally before the probe function returns. When tower_delete is called in the probe function (after an r/w has been initiated), core dev structures are deleted while the file operation functions are still running. If the 0 address is mappable on the machine, this vulnerability can be used to create a Local Priviege Escalation exploit via a write-what-where condition by remapping dev->interrupt_out_buffer in tower_write. A forged USB device and local program execution would be required for LPE. The USB device would have to delay the control message in tower_probe and accept the control urb in tower_open whilst guest code initiated a write to the device file as tower_delete is called from the error in tower_probe. This bug has existed since 2003. Patch tested by emulated device. Reported-by: James Patrick-Evans <james@jmp-e.com> Tested-by: James Patrick-Evans <james@jmp-e.com> Signed-off-by: James Patrick-Evans <james@jmp-e.com> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Diffstat (limited to 'kernel')
0 files changed, 0 insertions, 0 deletions