Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 172101 Details for
Bug 245960
dev-libs/libxml2 <2.7.2-r1 Integer overflow/infinite loop (CVE-2008-4225, CVE-2008-4226)
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
libxml2-2.7.2-CVE-2008-4226.patch
libxml2-2.7.2-CVE-2008-4226.patch (text/plain), 1.17 KB, created by
Robert Buchholz (RETIRED)
on 2008-11-17 18:19:37 UTC
(
hide
)
Description:
libxml2-2.7.2-CVE-2008-4226.patch
Filename:
MIME Type:
Creator:
Robert Buchholz (RETIRED)
Created:
2008-11-17 18:19:37 UTC
Size:
1.17 KB
patch
obsolete
>Index: libxml2-2.7.2/SAX2.c >=================================================================== >--- libxml2-2.7.2.orig/SAX2.c >+++ libxml2-2.7.2/SAX2.c >@@ -11,6 +11,7 @@ > #include "libxml.h" > #include <stdlib.h> > #include <string.h> >+#include <limits.h> > #include <libxml/xmlmemory.h> > #include <libxml/tree.h> > #include <libxml/parser.h> >@@ -26,6 +27,11 @@ > #include <libxml/HTMLtree.h> > #include <libxml/globals.h> > >+/* Define SIZE_T_MAX unless defined through <limits.h>. */ >+#ifndef SIZE_T_MAX >+# define SIZE_T_MAX ((size_t)-1) >+#endif /* !SIZE_T_MAX */ >+ > /* #define DEBUG_SAX2 */ > /* #define DEBUG_SAX2_TREE */ > >@@ -2455,9 +2461,14 @@ xmlSAX2Characters(void *ctx, const xmlCh > (xmlDictOwns(ctxt->dict, lastChild->content))) { > lastChild->content = xmlStrdup(lastChild->content); > } >+ if ((size_t)ctxt->nodelen > SIZE_T_MAX - (size_t)len || >+ (size_t)ctxt->nodemem + (size_t)len > SIZE_T_MAX / 2) { >+ xmlSAX2ErrMemory(ctxt, "xmlSAX2Characters overflow prevented"); >+ return; >+ } > if (ctxt->nodelen + len >= ctxt->nodemem) { > xmlChar *newbuf; >- int size; >+ size_t size; > > size = ctxt->nodemem + len; > size *= 2;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 245960
:
170985
|
170987
|
172041
|
172099
| 172101