Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP3:GA
qemu-linux-user.4227
0247-net-mipsnet-check-packet-length-aga.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0247-net-mipsnet-check-packet-length-aga.patch of Package qemu-linux-user.4227
From 71b175d9c9af258b9d7ddcc64d07cb849f63330d Mon Sep 17 00:00:00 2001 From: Prasad J Pandit <pjp@fedoraproject.org> Date: Thu, 7 Apr 2016 04:27:00 -0600 Subject: [PATCH] net: mipsnet: check packet length against buffer 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 <oleksandr.bazhaniuk@intel.com> Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org> [BR: BSC#975136 CVE-2016-4002] Signed-off-by: Bruce Rogers <brogers@suse.com> --- hw/net/mipsnet.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/net/mipsnet.c b/hw/net/mipsnet.c index e421b867e7..4d0c97534a 100644 --- 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 -1; + if (size >= sizeof(s->rx_buffer)) { + return 0; + } s->busy = 1; /* Just accept everything. */
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor