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, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more)
Debian Bugs874754

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

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs
libbsonsource(unstable)1.8.0-1874754

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