Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Maintenance:9835
qemu-testsuite.openSUSE_Leap_42.3_Update
0130-net-ignore-packet-size-greater-than.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0130-net-ignore-packet-size-greater-than.patch of Package qemu-testsuite.openSUSE_Leap_42.3_Update
From f7969858ca4dc3d41b268516902ac1aaac0aa2ad Mon Sep 17 00:00:00 2001 From: Jason Wang <jasowang@redhat.com> Date: Wed, 30 May 2018 13:16:36 +0800 Subject: [PATCH] net: ignore packet size greater than INT_MAX There should not be a reason for passing a packet size greater than INT_MAX. It's usually a hint of bug somewhere, so ignore packet size greater than INT_MAX in qemu_deliver_packet_iov() CC: qemu-stable@nongnu.org Reported-by: Daniel Shapira <daniel@twistlock.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Jason Wang <jasowang@redhat.com> (cherry picked from commit 1592a9947036d60dde5404204a5d45975133caf5) [LD: BSC#1111013 CVE-2018-17963] Signed-off-by: Larry Dewey <ldewey@suse.com> --- net/net.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/net/net.c b/net/net.c index 0ac3b9e80c..c2e8fafde4 100644 --- a/net/net.c +++ b/net/net.c @@ -716,10 +716,15 @@ ssize_t qemu_deliver_packet_iov(NetClientState *sender, void *opaque) { NetClientState *nc = opaque; + size_t size = iov_size(iov, iovcnt); int ret; + if (size > INT_MAX) { + return size; + } + if (nc->link_down) { - return iov_size(iov, iovcnt); + return size; } if (nc->receive_disabled) {
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