]> git.ipfire.org Git - thirdparty/qemu.git/commit
ehci: apply limit to iTD/sidt descriptors
authorGerd Hoffmann <kraxel@redhat.com>
Mon, 18 Apr 2016 07:11:38 +0000 (09:11 +0200)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Mon, 9 May 2016 03:37:09 +0000 (22:37 -0500)
commit706bab670bab12dddca0318b402461013e412270
tree63b1bfe5be1c01ababa25a7814670dc99eb1ace4
parent44b86aa32e4147c727fadd9a0f0bc503a5dedb72
ehci: apply limit to iTD/sidt descriptors

Commit "156a2e4 ehci: make idt processing more robust" tries to avoid a
DoS by the guest (create a circular iTD queue and let qemu ehci
emulation run in circles forever).  Unfortunately this has two problems:
First it misses the case of siTDs, and second it reportedly breaks
FreeBSD.

So lets go for a different approach: just count the number of iTDs and
siTDs we have seen per frame and apply a limit.  That should really
catch all cases now.

Reported-by: 杜少博 <dushaobo@360.cn>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
(cherry picked from commit 1ae3f2f178087711f9591350abad133525ba93f2)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
hw/usb/hcd-ehci.c