Re: [Qemu-devel] [PATCH] net: mipsnet: check packet length against buffer

2016-04-26 Thread Jason Wang
On 04/07/2016 06:26 PM, P J P wrote: > From: Prasad J Pandit > > When receiving packets over MIPSnet network device, it uses > receive buffer of size 1514 bytes. In case the controller > accepts large(MTU) packets, it could lead to memory corruption. > Add check to avoid it. > > Reported by: Ol

Re: [Qemu-devel] [PATCH] net: mipsnet: check packet length against buffer

2016-04-11 Thread P J P
+-- On Mon, 11 Apr 2016, Jason Wang wrote --+ | Can't find either. Looking at kernel driver git logs, the driver was even | removed since 2012 because it was not longer supported by MIPS. Consider it | indeed fixes a memory corruption, I tend to apply this first for 2.6. Okay, thank you. -- Pras

Re: [Qemu-devel] [PATCH] net: mipsnet: check packet length against buffer

2016-04-11 Thread Jason Wang
On 04/11/2016 03:37 PM, P J P wrote: > +-- On Thu, 7 Apr 2016, Markus Armbruster wrote --+ > | P J P writes: > | > | > --- a/hw/net/mipsnet.c > | > +++ b/hw/net/mipsnet.c > | > @@ -82,6 +82,9 @@ static ssize_t mipsnet_receive(NetClientState *nc, > const uint8_t *buf, size_t si > | > if (!

Re: [Qemu-devel] [PATCH] net: mipsnet: check packet length against buffer

2016-04-11 Thread P J P
+-- On Thu, 7 Apr 2016, Markus Armbruster wrote --+ | P J P writes: | | > --- a/hw/net/mipsnet.c | > +++ b/hw/net/mipsnet.c | > @@ -82,6 +82,9 @@ static ssize_t mipsnet_receive(NetClientState *nc, const uint8_t *buf, size_t si | > if (!mipsnet_can_receive(nc)) | > return 0; | > |

Re: [Qemu-devel] [PATCH] net: mipsnet: check packet length against buffer

2016-04-07 Thread Markus Armbruster
P J P writes: > From: Prasad J Pandit > > When receiving packets over MIPSnet network device, it uses > receive buffer of size 1514 bytes. In case the controller > accepts large(MTU) packets, it could lead to memory corruption. > Add check to avoid it. > > Reported by: Oleksandr Bazhaniuk > >

[Qemu-devel] [PATCH] net: mipsnet: check packet length against buffer

2016-04-07 Thread P J P
From: Prasad J Pandit When receiving packets over MIPSnet network device, it uses receive buffer of size 1514 bytes. In case the controller accepts large(MTU) packets, it could lead to memory corruption. Add check to avoid it. Reported by: Oleksandr Bazhaniuk Signed-off-by: Prasad J Pandit -