CVE-2016-6354
Publication date 21 September 2016
Last updated 26 August 2025
Ubuntu priority
Cvss 3 Severity Score
Description
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.
Status
| Package | Ubuntu Release | Status |
|---|---|---|
| flex | 25.10 questing |
Not affected
|
| 25.04 plucky |
Not affected
|
|
| 24.04 LTS noble |
Not affected
|
|
| 22.04 LTS jammy |
Not affected
|
|
| 20.04 LTS focal |
Not affected
|
|
| 18.04 LTS bionic |
Not affected
|
|
| 16.04 LTS xenial |
Vulnerable
|
|
| 14.04 LTS trusty | Not in release | |
Notes
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.
Severity score breakdown
| Parameter | Value |
|---|---|
| Base score |
|
| Attack vector | Network |
| Attack complexity | Low |
| Privileges required | None |
| User interaction | None |
| Scope | Unchanged |
| Confidentiality | High |
| Integrity impact | High |
| Availability impact | High |
| Vector | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |