Name | CVE-2022-24795 |
Description | yajl-ruby is a C binding to the YAJL JSON parsing and generation library. The 1.x branch and the 2.x branch of `yajl` contain an integer overflow which leads to subsequent heap memory corruption when dealing with large (~2GB) inputs. The reallocation logic at `yajl_buf.c#L64` may result in the `need` 32bit integer wrapping to 0 when `need` approaches a value of 0x80000000 (i.e. ~2GB of data), which results in a reallocation of buf->alloc into a small heap chunk. These integers are declared as `size_t` in the 2.x branch of `yajl`, which practically prevents the issue from triggering on 64bit platforms, however this does not preclude this issue triggering on 32bit builds on which `size_t` is a 32bit integer. Subsequent population of this under-allocated heap chunk is based on the original buffer size, leading to heap memory corruption. This vulnerability mostly impacts process availability. Maintainers believe exploitation for arbitrary code execution is unlikely. A patch is available and anticipated to be part of yajl-ruby version 1.4.2. As a workaround, avoid passing large inputs to YAJL. |
Source | CVE (at NVD; CERT, LWN, oss-sec, fulldisc, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more) |
References | DLA-3492-1, DLA-3516-1 |
Debian Bugs | 1014803, 1040036, 1040146, 1040161 |
The table below lists information on source packages.
Source Package | Release | Version | Status |
---|---|---|---|
burp (PTS) | bullseye | 2.2.18-8 | vulnerable |
bookworm | 3.1.4-1 | vulnerable | |
sid, trixie | 3.1.4-3.1 | fixed | |
epics-base (PTS) | bookworm | 7.0.3.1-4 | fixed |
sid, trixie | 7.0.8.1+dfsg1-6 | fixed | |
r-cran-jsonlite (PTS) | bullseye | 1.7.2+dfsg-1 | vulnerable |
bookworm | 1.8.4+dfsg-1 | vulnerable | |
sid, trixie | 1.8.9+dfsg-1 | fixed | |
ruby-yajl (PTS) | bullseye | 1.4.1-1 | vulnerable |
sid, trixie, bookworm | 1.4.3-1 | fixed | |
xqilla (PTS) | bullseye | 2.3.4-1 | fixed |
yajl (PTS) | bullseye | 2.1.0-3+deb11u2 | fixed |
bookworm | 2.1.0-3+deb12u2 | fixed | |
sid, trixie | 2.1.0-5 | fixed |
The information below is based on the following data on fixed versions.
Package | Type | Release | Fixed Version | Urgency | Origin | Debian Bugs |
---|---|---|---|---|---|---|
burp | source | buster | 2.1.32-2+deb10u1 | DLA-3516-1 | ||
burp | source | (unstable) | 3.1.4-2 | 1040146 | ||
epics-base | source | (unstable) | (not affected) | |||
r-cran-jsonlite | source | (unstable) | 1.8.8+dfsg-1 | 1040161 | ||
ruby-yajl | source | (unstable) | 1.4.3-1 | 1014803 | ||
xqilla | source | (unstable) | (not affected) | |||
yajl | source | buster | 2.1.0-3+deb10u2 | DLA-3492-1 | ||
yajl | source | bullseye | 2.1.0-3+deb11u2 | |||
yajl | source | bookworm | 2.1.0-3+deb12u2 | |||
yajl | source | (unstable) | 2.1.0-4 | 1040036 |
[bullseye] - ruby-yajl <no-dsa> (Minor issue)
[buster] - ruby-yajl <no-dsa> (Minor issue)
[stretch] - ruby-yajl <no-dsa> (Minor issue)
[bookworm] - burp <no-dsa> (Minor issue)
[bullseye] - burp <no-dsa> (Minor issue)
- epics-base <not-affected> (Forked parser not affected, #1040159)
[bookworm] - r-cran-jsonlite <no-dsa> (Minor issue)
[bullseye] - r-cran-jsonlite <no-dsa> (Minor issue)
[buster] - r-cran-jsonlite <no-dsa> (Minor issue)
- xqilla <not-affected> (Vulnerable code not present; embeds not-affected ancient yajl version)
xqilla's embedded yajl is ancient (around 0.2.2), not having the vulnerable code
https://github.com/brianmario/yajl-ruby/security/advisories/GHSA-jj47-x69x-mxrm
https://github.com/brianmario/yajl-ruby/commit/7168bd79b888900aa94523301126f968a93eb3a6
https://github.com/brianmario/yajl-ruby/commit/e8de283a6d64f0902740fd09e858fc3d7d803161
https://github.com/lloyd/yajl/issues/239
burp fix: https://github.com/grke/burp/commit/5ce44cdf7018767b53a4c5466c62e4dc99d0bc93
epics-base: https://github.com/epics-base/epics-base/issues/405
r-cran-jsonlite: https://github.com/jeroen/jsonlite/issues/431
r-cran-jsonlite: https://github.com/jeroen/jsonlite/commit/e425ef9cb39500687d83654a565c8abd203ff8ba (v1.8.8)