cf91b1dfd9
CVE-2016-4952 scsi: pvscsi: out-of-bounds access issue CVE-2016-4964: scsi: mptsas infinite loop (bz #1339157) CVE-2016-5106: scsi: megasas: out-of-bounds write (bz #1339581) CVE-2016-5105: scsi: megasas: stack information leakage (bz #1339585) CVE-2016-5107: scsi: megasas: out-of-bounds read (bz #1339573) CVE-2016-4454: display: vmsvga: out-of-bounds read (bz #1340740) CVE-2016-4453: display: vmsvga: infinite loop (bz #1340744) CVE-2016-5126: block: iscsi: buffer overflow (bz #1340925) CVE-2016-5238: scsi: esp: OOB write (bz #1341932) CVE-2016-5338: scsi: esp: OOB r/w access (bz #1343325) CVE-2016-5337: scsi: megasas: information leakage (bz #1343910) Fix crash with -nodefaults -sdl (bz #1340931) Add deps on edk2-ovmf and edk2-aarch64
33 lines
1.0 KiB
Diff
33 lines
1.0 KiB
Diff
From: Prasad J Pandit <pjp@fedoraproject.org>
|
|
Date: Thu, 7 Apr 2016 15:56:02 +0530
|
|
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>
|
|
Signed-off-by: Jason Wang <jasowang@redhat.com>
|
|
|
|
(cherry picked from commit 3af9187fc6caaf415ab9c0c6d92c9678f65cb17f)
|
|
---
|
|
hw/net/mipsnet.c | 3 +++
|
|
1 file changed, 3 insertions(+)
|
|
|
|
diff --git a/hw/net/mipsnet.c b/hw/net/mipsnet.c
|
|
index 740cd98..cf8b823 100644
|
|
--- a/hw/net/mipsnet.c
|
|
+++ b/hw/net/mipsnet.c
|
|
@@ -83,6 +83,9 @@ static ssize_t mipsnet_receive(NetClientState *nc, const uint8_t *buf, size_t si
|
|
if (!mipsnet_can_receive(nc))
|
|
return 0;
|
|
|
|
+ if (size >= sizeof(s->rx_buffer)) {
|
|
+ return 0;
|
|
+ }
|
|
s->busy = 1;
|
|
|
|
/* Just accept everything. */
|