Direct naar de inhoud
⚡ Kritieke cyberalerts voor jouw sector & systemen — direct in je inbox. Aanmelden →
cybernieuws.nl Cybersecurity en informatiebeveiling nieuws alerts live · 11 min 161 bronnen 1 kritiek 24 vandaag
CVE's Videos Dagbriefing

← Terug naar CVE-database

CVE-2017-9047

HIGH · 7.5 CVSS Gepubliceerd: CWE-119

Beschrijving NL

Er werd een bufferoverloop ontdekt in libxml2 20904-GITv2.9.4-16-g0741801. De functie xmlSnprintfElementContent in valid.c wordt verondersteld de inhoudsdefinitie van het element recursief te dumpen in een tekenbuffer 'buf' van grootte 'size'. De variabele lengte krijgt strlen(buf) toegewezen. Als het content->type XML_ELEMENT_CONTENT_ELEMENT is, wordt (i) het content->voorvoegsel toegevoegd aan buf (als het daadwerkelijk past) waarna (ii) content->naam naar de buffer wordt geschreven. De controle of de inhoud->naam daadwerkelijk past, maakt echter ook gebruik van 'len' in plaats van de bijgewerkte buffelengte strlen(buf). Dit stelt ons in staat om te schrijven over "grootte" van vele bytes buiten het toegewezen geheugen. Dit beveiligingslek zorgt ervoor dat programma's die libxml2 gebruiken, zoals PHP, vastlopen.

Origineel (Engels) tonen

A buffer overflow was discovered in libxml2 20904-GITv2.9.4-16-g0741801. The function xmlSnprintfElementContent in valid.c is supposed to recursively dump the element content definition into a char buffer 'buf' of size 'size'. The variable len is assigned strlen(buf). If the content->type is XML_ELEMENT_CONTENT_ELEMENT, then (i) the content->prefix is appended to buf (if it actually fits) whereupon (ii) content->name is written to the buffer. However, the check for whether the content->name actually fits also uses 'len' rather than the updated buffer length strlen(buf). This allows us to write about "size" many bytes beyond the allocated memory. This vulnerability causes programs that use libxml2, such as PHP, to crash.

Vendors

Xmlsoft

Affected products

Libxml2

References