target-arm queue
Only one patch for target-arm for rc2...
thanks
-- PMM
The following changes since commit 5144fe36056d3a94b0d8da9e10adc555c057baa8:
Merge remote-tracking branch 'remotes/kraxel/tags/pull-vga-20160411-1' into staging (2016-04-11 13:32:50 +0100)
are available in the git repository at:
git://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20160411
for you to fetch changes up to 3a15cc0e1ee7168db0782133d2607a6bfa422d66:
net: stellaris_enet: check packet length against receive buffer (2016-04-11 14:22:33 +0100)
----------------------------------------------------------------
target-arm queue:
* stellaris_enet: don't overrun buffer if fed oversize packet
----------------------------------------------------------------
Prasad J Pandit (1):
net: stellaris_enet: check packet length against receive buffer
hw/net/stellaris_enet.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)
[Qemu-devel] [PULL 1/1] net: stellaris_enet: check packet length against receive buffer
From: Prasad J Pandit <[email protected]>
When receiving packets over Stellaris ethernet controller, it uses receive buffer of size 2048 bytes. In case the controller accepts large(MTU) packets, it could lead to memory corruption. Add check to avoid it.
Message-id: [email protected]
--- hw/net/stellaris_enet.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)
hw/net/stellaris_enet.c +11 -1
@@ -236,8 +236,18 @@ static ssize_t stellaris_enet_receive(NetClientState *nc, const uint8_t *buf, si n = s->next_packet + s->np;if (n >=31 ) n -=31 ; - s->np++; +if (size >=sizeof (s->rx[n].data) -6 ) { +/* If the packet won't fit into the +* emulated 2K RAM, this is reported +* as a FIFO overrun error. +*/ + s->ris |=SE_INT_FOV ; +stellaris_enet_update (s); +return -1 ; + } + + s->np++; s->rx[n].len = size +6 ; p = s->rx[n].data; *(p++) = (size +6 );
Signature · 1 line
1.9.1
Peter Maydell
AppliedQuoted 14 lines · Peter Maydell
Only one patch for target-arm for rc2...
thanks
-- PMMThe following changes since commit
5144fe36056d3a94b0d8da9e10adc555c057baa8:Merge remote-tracking branch 'remotes/kraxel/tags/pull-vga-20160411-1' into staging (2016-04-11 13:32:50 +0100)
are available in the git repository at:
git://git.linaro.org/people/pmaydell/qemu-arm.gittags/pull-target-arm-20160411
Quoted 7 lines
for you to fetch changes up to
3a15cc0e1ee7168db0782133d2607a6bfa422d66:net:
stellaris_enet: check packet length against receive buffer (2016-04-11 14:22:33 +0100)----------------------------------------------------------------
target-arm queue:
*stellaris_enet: don't overrun buffer if fed oversize packet
Applied, thanks.
-- PMM