summaryrefslogtreecommitdiffstats
path: root/src/drivers
diff options
context:
space:
mode:
authorMichael Brown2020-09-29 15:26:54 +0200
committerMichael Brown2020-09-29 15:26:54 +0200
commitfbb776f2f2d6e7f510a985af55ee34eb963ba9a2 (patch)
tree4ab240f280714e2701bf77a2bfc7cb63cf34b38b /src/drivers
parent[usb] Reset control endpoints immediately after failure (diff)
downloadipxe-fbb776f2f2d6e7f510a985af55ee34eb963ba9a2.tar.gz
ipxe-fbb776f2f2d6e7f510a985af55ee34eb963ba9a2.tar.xz
ipxe-fbb776f2f2d6e7f510a985af55ee34eb963ba9a2.zip
[efi] Leave USB endpoint descriptors in existence until device is removed
Some UEFI USB drivers (observed with the keyboard driver on a Microsoft Surface Go) will react to an asynchronous USB transfer failure by terminating the transfer from within the completion handler. This closes the USB endpoint and, in the current implementation, frees the containing structure. This can lead to use-after-free bugs after the UEFI USB driver's completion handler returns, since the calling code in iPXE expects that a completion handler will not perform a control-flow action such as terminating the transfer. Fix by leaving the USB endpoint structure allocated until the device is finally removed, as is already done (as an optimisation) for control and bulk transfers. Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/drivers')
0 files changed, 0 insertions, 0 deletions