CVE-2016-6354

Published: 21 September 2016

Heap-based buffer overflow in the yy_get_next_buffer function in Flex before 2.6.1 might allow context-dependent attackers to cause a denial of service or possibly execute arbitrary code via vectors involving num_to_read.

Priority

Low

CVSS 3 base score: 9.8

Status

Package Release Status
flex
Launchpad, Ubuntu, Debian
Upstream
Released (2.6.1)
Ubuntu 21.04 (Hirsute Hippo) Not vulnerable
(2.6.1-1)
Ubuntu 20.10 (Groovy Gorilla) Not vulnerable
(2.6.1-1)
Ubuntu 20.04 LTS (Focal Fossa) Not vulnerable
(2.6.1-1)
Ubuntu 18.04 LTS (Bionic Beaver) Not vulnerable
(2.6.1-1)
Ubuntu 16.04 ESM (Xenial Xerus) Needed

Ubuntu 14.04 ESM (Trusty Tahr) Does not exist
(trusty was not-affected [2.5.35-10.1ubuntu2])
Patches:
Upstream: https://github.com/westes/flex/commit/a5cbe929ac3255d371e698f62dc256afe7006466

Notes

AuthorNote
mdeslaur
introduced in 2.5.36 by
https://github.com/westes/flex/commit/9ba3187a537d6a58d345f2874d06087fd4050399
sbeattie
redhat bug claims that it's not exploitable due to followup code
also, simply replacing yy_size_t with int on num_to_read as
in the upstream patch causes even more signed comparison warnings in
flex generated sources; there's a comparison against a size_t
variable in YY_INPUT for one. The "correct" fix for this likely includes
the additional commit mentioned in the oss-security post.
fixing will also require recompiling anything with generated
code from the versions of flex in vivid through xenial.

References

Bugs