CVE-2017-14227

NameCVE-2017-14227
DescriptionIn MongoDB libbson 1.7.0, the bson_iter_codewscope function in bson-iter.c miscalculates a bson_utf8_validate length argument, which allows remote attackers to cause a denial of service (heap-based buffer over-read in the bson_utf8_validate function in bson-utf8.c), as demonstrated by bson-to-json.c.
SourceCVE (at NVD; CERT, LWN, oss-sec, fulldisc, bugtraq, EDB, Metasploit, Red Hat, Ubuntu, Gentoo, SuSE, Mageia, GitHub code/issues, web search, more)
NVD severitymedium (attack range: remote)
Debian Bugs874754

Vulnerable and fixed packages

The table below lists information on source packages.

Source PackageReleaseVersionStatus
libbson (PTS)stretch1.4.2-1vulnerable
buster, sid1.8.1-1fixed

The information below is based on the following data on fixed versions.

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs
libbsonsource(unstable)1.8.0-1medium874754

Notes

[stretch] - libbson <no-dsa> (Minor issue)
https://bugzilla.redhat.com/show_bug.cgi?id=1489355
https://bugzilla.redhat.com/show_bug.cgi?id=1489356
https://bugzilla.redhat.com/show_bug.cgi?id=1489362
Latest https://github.com/mongodb/libbson/commit/0f501e7ed51a42d5502d319bce35b41f1a3aa112 (1.7.0-rc0)
uncovers the issue, which introduces UTF-8 validation during JSON encoding.
Only after that the utf8_len=4294967295 as shown with the POC is passed to
bson_utf8_validate via src/bson/bson-iter.c:2069
Still the underlying issue in bson-iter.c when parsing BSON with a codewscope
type is present in earlier versions.
Upstream issue: https://jira.mongodb.org/browse/CDRIVER-2269
Fixed by: https://github.com/mongodb/libbson/commit/42900956dc461dfe7fb91d93361d10737c1602b3

Search for package or bug name: Reporting problems