Message ID | 1453209440-16455-1-git-send-email-lersek@redhat.com |
---|---|
State | Superseded |
Headers | show |
On 01/22/16 07:15, Jason Wang wrote: > > > On 01/22/2016 02:11 PM, Michael Tokarev wrote: >> 22.01.2016 06:09, Jason Wang wrote: >>> On 01/19/2016 09:17 PM, Laszlo Ersek wrote: >>>> The start_xmit() and e1000_receive_iov() functions implement DMA transfers >>>> iterating over a set of descriptors that the guest's e1000 driver >>>> prepares: >> ... >>> Applied in my -net. >> This is CVE-2016-1981, btw. >> >> /mjt >> > > Add this into commit log. Thanks guys! Laszlo
Hello Jason, On 01/22/16 07:15, Jason Wang wrote: > > > On 01/22/2016 02:11 PM, Michael Tokarev wrote: >> 22.01.2016 06:09, Jason Wang wrote: >>> On 01/19/2016 09:17 PM, Laszlo Ersek wrote: >>>> The start_xmit() and e1000_receive_iov() functions implement DMA transfers >>>> iterating over a set of descriptors that the guest's e1000 driver >>>> prepares: >> ... >>> Applied in my -net. >> This is CVE-2016-1981, btw. >> >> /mjt >> > > Add this into commit log. do you plan to send a PULL req soon? The patch is not really urgent, but it would help me move forward with my queue. Thanks! Laszlo
On 01/28/16 06:47, Jason Wang wrote: > > > On 01/28/2016 02:35 AM, Laszlo Ersek wrote: >> Hello Jason, >> >> On 01/22/16 07:15, Jason Wang wrote: >>> >>> On 01/22/2016 02:11 PM, Michael Tokarev wrote: >>>> 22.01.2016 06:09, Jason Wang wrote: >>>>> On 01/19/2016 09:17 PM, Laszlo Ersek wrote: >>>>>> The start_xmit() and e1000_receive_iov() functions implement DMA transfers >>>>>> iterating over a set of descriptors that the guest's e1000 driver >>>>>> prepares: >>>> ... >>>>> Applied in my -net. >>>> This is CVE-2016-1981, btw. >>>> >>>> /mjt >>>> >>> Add this into commit log. >> do you plan to send a PULL req soon? The patch is not really urgent, but >> it would help me move forward with my queue. >> >> Thanks! >> Laszlo >> > > Plan to send it next Tuesday. But if you wish, I can send it tomorrow. Next Tuesday is perfectly fine, thank you! Laszlo
diff --git a/hw/net/e1000.c b/hw/net/e1000.c index bec06e9..34d0823 100644 --- a/hw/net/e1000.c +++ b/hw/net/e1000.c @@ -908,7 +908,8 @@ start_xmit(E1000State *s) * bogus values to TDT/TDLEN. * there's nothing too intelligent we could do about this. */ - if (s->mac_reg[TDH] == tdh_start) { + if (s->mac_reg[TDH] == tdh_start || + tdh_start >= s->mac_reg[TDLEN] / sizeof(desc)) { DBGOUT(TXERR, "TDH wraparound @%x, TDT %x, TDLEN %x\n", tdh_start, s->mac_reg[TDT], s->mac_reg[TDLEN]); break; @@ -1165,7 +1166,8 @@ e1000_receive_iov(NetClientState *nc, const struct iovec *iov, int iovcnt) if (++s->mac_reg[RDH] * sizeof(desc) >= s->mac_reg[RDLEN]) s->mac_reg[RDH] = 0; /* see comment in start_xmit; same here */ - if (s->mac_reg[RDH] == rdh_start) { + if (s->mac_reg[RDH] == rdh_start || + rdh_start >= s->mac_reg[RDLEN] / sizeof(desc)) { DBGOUT(RXERR, "RDH wraparound @%x, RDT %x, RDLEN %x\n", rdh_start, s->mac_reg[RDT], s->mac_reg[RDLEN]); set_ics(s, 0, E1000_ICS_RXO);