Description
GNU Bison before 3.7.1 has a use-after-free in _obstack_free in lib/obstack.c (called from gram_lex) when a '\0' byte is encountered. NOTE: there is a risk only if Bison is used with untrusted input, and the observed bug happens to cause unsafe behavior with a specific compiler/architecture. The bug report was intended to show that a crash may occur in Bison itself, not that a crash may occur in code that is generated by Bison.
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | bison | 2:3.7.2+dfsg-1 | — |
| Debian 13 | bison | 2:3.7.2+dfsg-1 | — |
| Debian 12 | bison | 2:3.7.2+dfsg-1 | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 20.04 LTS | bison | No fix yet | — |
| Ubuntu 18.04 LTS | bison | No fix yet | — |
| Ubuntu 16.04 LTS | bison | No fix yet | — |
Alpine
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine v3.24 | bison | 3.7.2-r0 | — |
| Alpine v3.23 | bison | 3.7.2-r0 | — |
| Alpine v3.22 | bison | 3.7.2-r0 | — |
| Alpine v3.21 | bison | 3.7.2-r0 | — |
| Alpine v3.20 | bison | 3.7.2-r0 | — |
Show 7 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine v3.19 | bison | 3.7.2-r0 | — |
| Alpine v3.18 | bison | 3.7.2-r0 | — |
| Alpine v3.17 | bison | 3.7.2-r0 | — |
| Alpine v3.16 | bison | 3.7.2-r0 | — |
| Alpine v3.15 | bison | 3.7.2-r0 | — |
| Alpine v3.14 | bison | 3.7.2-r0 | — |
| Alpine v3.13 | bison | 3.7.2-r0 | — |