Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Step:15-SP4
qemu.12241
0140-Fix-heap-overflow-in-ip_reass-on-bi.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0140-Fix-heap-overflow-in-ip_reass-on-bi.patch of Package qemu.12241
From ffb5778df7e620203ac681638670159ec96aecef Mon Sep 17 00:00:00 2001 From: Samuel Thibault <samuel.thibault@ens-lyon.org> Date: Tue, 6 Aug 2019 18:16:07 -0400 Subject: [PATCH] Fix heap overflow in ip_reass on big packet input When the first fragment does not fit in the preallocated buffer, q will already be pointing to the ext buffer, so we mustn't try to update it. Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> (cherry picked from commit 126c04acbabd7ad32c2b018fe10dfac2a3bc1210) [LY: CVE-2019-14378 BSC#1143794] Signed-off-by: Liang Yan <lyan@suse.com> --- slirp/ip_input.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/slirp/ip_input.c b/slirp/ip_input.c index 348e1dca5a..644b550d4e 100644 --- a/slirp/ip_input.c +++ b/slirp/ip_input.c @@ -334,6 +334,8 @@ insert: q = fp->frag_link.next; m = dtom(slirp, q); + int was_ext = m->m_flags & M_EXT; + q = (struct ipasfrag *) q->ipf_next; while (q != (struct ipasfrag*)&fp->frag_link) { struct mbuf *t = dtom(slirp, q); @@ -356,7 +358,7 @@ insert: * the old buffer (in the mbuf), so we must point ip * into the new buffer. */ - if (m->m_flags & M_EXT) { + if (!was_ext && m->m_flags & M_EXT) { int delta = (char *)q - m->m_dat; q = (struct ipasfrag *)(m->m_ext + delta); }
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