CVE-2022-24795
Published: 5 April 2022
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.
Notes
Author | Note |
---|---|
mdeslaur | CVE is assigned to yajl-ruby. There is an unofficial patch for yajl which will abort() too, though that is likely hardening and isn't part of this CVE. |
ccdm94 | no upstream patch available as of 2023-06-07 for yajl. There is an open pull request for the unofficial patch, however, the fix proposed by the patch is being further discussed on the comments of this pull request. The unofficial patch is being disputed by some, and new patches have been proposed. More information at https://github.com/lloyd/yajl/pull/240. |
Priority
Status
Package | Release | Status |
---|---|---|
yajl Launchpad, Ubuntu, Debian |
trusty |
Released
(2.0.4-4ubuntu0.1~esm1)
Available with Ubuntu Pro or Ubuntu Pro (Infra-only) |
kinetic |
Ignored
(end of life, was needed)
|
|
upstream |
Released
(2.1.0-3+deb10u2)
|
|
xenial |
Released
(2.1.0-2ubuntu0.16.04.1~esm1)
Available with Ubuntu Pro or Ubuntu Pro (Infra-only) |
|
jammy |
Needed
|
|
bionic |
Released
(2.1.0-2ubuntu0.18.04.1~esm1)
Available with Ubuntu Pro or Ubuntu Pro (Infra-only) |
|
focal |
Needed
|
|
impish |
Ignored
(end of life)
|
|
lunar |
Needed
|
|
Patches: other: https://github.com/ppisar/yajl/commit/23cea2d7677e396efed78bbf1bf153961fab6bad |
||
argyll Launchpad, Ubuntu, Debian |
trusty |
Ignored
(end of standard support)
|
bionic |
Needs triage
|
|
focal |
Needs triage
|
|
impish |
Ignored
(end of life)
|
|
xenial |
Needs triage
|
|
upstream |
Needs triage
|
|
jammy |
Needs triage
|
|
kinetic |
Ignored
(end of life, was needs-triage)
|
|
lunar |
Needs triage
|
|
ruby-yajl Launchpad, Ubuntu, Debian |
kinetic |
Ignored
(end of life, was needs-triage)
|
bionic |
Needs triage
|
|
focal |
Needs triage
|
|
trusty |
Ignored
(end of standard support)
|
|
upstream |
Needs triage
|
|
xenial |
Needs triage
|
|
jammy |
Needs triage
|
|
impish |
Ignored
(end of life)
|
|
lunar |
Needs triage
|
|
Patches: upstream: https://github.com/brianmario/yajl-ruby/commit/7168bd79b888900aa94523301126f968a93eb3a6 |
||
tulip Launchpad, Ubuntu, Debian |
kinetic |
Ignored
(end of life, was needs-triage)
|
trusty |
Ignored
(end of standard support)
|
|
upstream |
Needs triage
|
|
xenial |
Needs triage
|
|
jammy |
Needs triage
|
|
impish |
Ignored
(end of life)
|
|
lunar |
Needs triage
|
|
burp Launchpad, Ubuntu, Debian |
bionic |
Needs triage
|
focal |
Needs triage
|
|
impish |
Ignored
(end of life)
|
|
trusty |
Ignored
(end of standard support)
|
|
upstream |
Needs triage
|
|
xenial |
Needs triage
|
|
jammy |
Needs triage
|
|
kinetic |
Ignored
(end of life, was needs-triage)
|
|
lunar |
Needs triage
|
|
centreon-broker Launchpad, Ubuntu, Debian |
trusty |
Ignored
(end of standard support)
|
upstream |
Needs triage
|
|
xenial |
Ignored
(end of standard support)
|
|
collada2gltf Launchpad, Ubuntu, Debian |
bionic |
Needs triage
|
impish |
Ignored
(end of life)
|
|
trusty |
Ignored
(end of standard support)
|
|
upstream |
Needs triage
|
|
xenial |
Needs triage
|
|
jammy |
Needs triage
|
|
kinetic |
Ignored
(end of life, was needs-triage)
|
|
lunar |
Needs triage
|
|
icinga2 Launchpad, Ubuntu, Debian |
bionic |
Needs triage
|
focal |
Needs triage
|
|
trusty |
Ignored
(end of standard support)
|
|
upstream |
Needs triage
|
|
xenial |
Needs triage
|
|
jammy |
Needs triage
|
|
impish |
Ignored
(end of life)
|
|
kinetic |
Ignored
(end of life, was needs-triage)
|
|
lunar |
Needs triage
|
|
libbson Launchpad, Ubuntu, Debian |
bionic |
Needs triage
|
trusty |
Ignored
(end of standard support)
|
|
upstream |
Needs triage
|
|
xenial |
Needs triage
|
|
lnav Launchpad, Ubuntu, Debian |
bionic |
Needs triage
|
focal |
Needs triage
|
|
trusty |
Ignored
(end of standard support)
|
|
upstream |
Needs triage
|
|
xenial |
Needs triage
|
|
jammy |
Needs triage
|
|
impish |
Ignored
(end of life)
|
|
kinetic |
Ignored
(end of life, was needs-triage)
|
|
lunar |
Needs triage
|
|
php-mongodb Launchpad, Ubuntu, Debian |
bionic |
Needs triage
|
focal |
Needs triage
|
|
trusty |
Ignored
(end of standard support)
|
|
upstream |
Needs triage
|
|
xenial |
Needs triage
|
|
jammy |
Needs triage
|
|
impish |
Ignored
(end of life)
|
|
kinetic |
Ignored
(end of life, was needs-triage)
|
|
lunar |
Needs triage
|
|
r-cran-jsonlite Launchpad, Ubuntu, Debian |
bionic |
Needs triage
|
focal |
Needs triage
|
|
trusty |
Ignored
(end of standard support)
|
|
upstream |
Needs triage
|
|
xenial |
Needs triage
|
|
jammy |
Needs triage
|
|
impish |
Ignored
(end of life)
|
|
kinetic |
Ignored
(end of life, was needs-triage)
|
|
lunar |
Needs triage
|
Severity score breakdown
Parameter | Value |
---|---|
Base score | 7.5 |
Attack vector | Network |
Attack complexity | Low |
Privileges required | None |
User interaction | None |
Scope | Unchanged |
Confidentiality | None |
Integrity impact | None |
Availability impact | High |
Vector | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |