Skip to contentSkip to conversation

xhci: guard xhci_kick_epctx against recursive calls for 2.8?

Qemu-devel Michael Tokarev 2 participants 2 messages Jul 31, 2017 – Aug 21, 2017

lore
Share & tools
lore
#0 lore raw

After applying commit 96d87bdda3919bb16f754b3d3fd1227e1f38f13c:

Author: Gerd Hoffmann <[email protected]>
Date:   Thu Feb 2 12:36:12 2017 +0100

xhci: guard xhci_kick_epctx against recursive calls

Track xhci_kick_epctx processing being active in a variable. Check the variable before calling xhci_kick_epctx from xhci_kick_ep. Add an assert to make sure we don't call recursively into xhci_kick_epctx.

Fixes 94b037f2a451b3dc855f9f2c346e5049a361bd55

Message-id: [email protected]
Message-id: [email protected]

to 2.8, to fix the CVE-2017-9375 in 2.8, it starts to fail at startup with the assertion failure introduced in this commit:

hw/usb/hcd-xhci.c:2169: xhci_kick_epctx: Assertion `!epctx->kick_active' failed.

The commit itself looks sane, but might be there were other fixes before this one, on top of 2.8, required for it to functioning properly? I'm not sure I understand the xhci machinery right.

Gerd, can you shed some light on this please?

Thank you!

/mjt

#1 lore raw
Quoted 11 lines

After applying commit 96d87bdda3919bb16f754b3d3fd1227e1f38f13c:

Author: Gerd Hoffmann <[email protected]>
Date:   Thu Feb 2 12:36:12 2017 +0100

    xhci: guard xhci_kick_epctx against recursive calls

to 2.8, to fix the CVE-2017-9375 in 2.8, it starts to fail at startup with the assertion failure introduced in this commit:

Quoted 7 lines

 hw/usb/hcd-xhci.c:2169: xhci_kick_epctx: Assertion `!epctx-

Quoted 1 line

kick_active' failed.

The commit itself looks sane, but might be there were other fixes before this one, on top of 2.8, required for it to functioning properly?  I'm not sure I understand the xhci machinery right.

ddb603ab6c981c1d67cb42266fc700c33e5b2d8f probably.

13e8ff7abbf1dde46280536ab4fae5012661b8b0 should help too, for cherry- picking without conflicts.

(just back from vacation).

cheers,
Gerd