Re: [PATCH] hw/net/ftgmac100: Fix integer overflow in ftgmac100_do_tx()

2020-07-29 Thread Cédric Le Goater
Sorry for the late answer. On 7/13/20 6:15 PM, Peter Maydell wrote: > On Mon, 13 Jul 2020 at 15:19, Cédric Le Goater wrote: >> On 7/10/20 1:33 PM, Peter Maydell wrote: >>> Andrew, Cedric: do you have the datasheet for this device? Do you >>> know if we should also be flagging the error back to th

Re: [PATCH] hw/net/ftgmac100: Fix integer overflow in ftgmac100_do_tx()

2020-07-13 Thread Peter Maydell
On Mon, 13 Jul 2020 at 15:19, Cédric Le Goater wrote: > On 7/10/20 1:33 PM, Peter Maydell wrote: > > Andrew, Cedric: do you have the datasheet for this device? Do you > > know if we should also be flagging the error back to the > > guest somehow? > > zero is the only invalid size of a transmit buf

Re: [PATCH] hw/net/ftgmac100: Fix integer overflow in ftgmac100_do_tx()

2020-07-13 Thread Cédric Le Goater
On 7/10/20 1:33 PM, Peter Maydell wrote: > On Fri, 10 Jul 2020 at 09:56, Mauro Matteo Cascella > wrote: >> >> An integer overflow issue was reported by Mr. Ziming Zhang, CC'd here. It >> occurs while inserting the VLAN tag in packets whose length is less than >> 12 bytes, as (len-12) is passed to

Re: [PATCH] hw/net/ftgmac100: Fix integer overflow in ftgmac100_do_tx()

2020-07-10 Thread Mauro Matteo Cascella
On Fri, Jul 10, 2020 at 1:33 PM Peter Maydell wrote: > > On Fri, 10 Jul 2020 at 09:56, Mauro Matteo Cascella > wrote: > > > > An integer overflow issue was reported by Mr. Ziming Zhang, CC'd here. It > > occurs while inserting the VLAN tag in packets whose length is less than > > 12 bytes, as (l

Re: [PATCH] hw/net/ftgmac100: Fix integer overflow in ftgmac100_do_tx()

2020-07-10 Thread Peter Maydell
On Fri, 10 Jul 2020 at 09:56, Mauro Matteo Cascella wrote: > > An integer overflow issue was reported by Mr. Ziming Zhang, CC'd here. It > occurs while inserting the VLAN tag in packets whose length is less than > 12 bytes, as (len-12) is passed to memmove() without proper checking. > This patch i