Advisory

UBUNTU-CVE-2017-9047

Also known as: CVE-2017-9047

Summary

The record has no summary.

Details

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.

Severity

High Basis: CVSS v3 score 7.5, vector CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Dates

Published
2017-05-18 00:00 UTC
Modified
2026-04-22 11:35 UTC

Affected packages and fixes

libxml2

Debian packages (deb) · Ubuntu 14.04

Affected

  • introduced 0, fixed 2.9.1+dfsg1-3ubuntu4.10 (ecosystem)

Fixed versions

2.9.1+dfsg1-3ubuntu4.10

Fix

  • Fixed version 2.9.1+dfsg1-3ubuntu4.10
    sudo apt-get update && sudo apt-get upgrade

This command upgrades the distribution's packages. Compare the fixed version with the version you have installed.

libxml2

Debian packages (deb) · Ubuntu 16.04

Affected

  • introduced 0, fixed 2.9.3+dfsg1-1ubuntu0.3 (ecosystem)

Fixed versions

2.9.3+dfsg1-1ubuntu0.3

Fix

  • Fixed version 2.9.3+dfsg1-1ubuntu0.3
    sudo apt-get update && sudo apt-get upgrade

This command upgrades the distribution's packages. Compare the fixed version with the version you have installed.

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: Ubuntu Security Notices · CC BY-SA 4.0

Sources & licences