2 results (0.032 seconds)

CVSS: 7.5EPSS: 1%CPEs: 1EXPL: 2

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. • https://github.com/brianmario/yajl-ruby/blob/7168bd79b888900aa94523301126f968a93eb3a6/ext/yajl/yajl_buf.c#L64 https://github.com/brianmario/yajl-ruby/commit/7168bd79b888900aa94523301126f968a93eb3a6 https://github.com/brianmario/yajl-ruby/security/advisories/GHSA-jj47-x69x-mxrm https://lists.debian.org/debian-lts-announce/2023/07/msg00013.html https://lists.debian.org/debian-lts-announce/2023/08/msg00003.html https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/KLE3C4CECEJ4EUYI56KXI6OWACWXX7 • CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer CWE-122: Heap-based Buffer Overflow CWE-190: Integer Overflow or Wraparound •

CVSS: 7.5EPSS: 1%CPEs: 2EXPL: 1

In the yajl-ruby gem 1.3.0 for Ruby, when a crafted JSON file is supplied to Yajl::Parser.new.parse, the whole ruby process crashes with a SIGABRT in the yajl_string_decode function in yajl_encode.c. This results in the whole ruby process terminating and potentially a denial of service. En la gema yajl-ruby 1.3.0 para Ruby, cuando se envía un archivo JSON manipulado a Yajl::Parser.new.parse, todo el proceso de ruby sufre un cierre inesperado con un SIGABRT en la función yajl_string_decode en yajl_encode.c. Esto tiene como resultado que todo el proceso de ruby finalice y posiblemente se provoque una denegación de servicio. • https://github.com/brianmario/yajl-ruby/issues/176 https://lists.debian.org/debian-lts-announce/2017/11/msg00010.html https://lists.debian.org/debian-lts-announce/2023/07/msg00013.html https://lists.debian.org/debian-lts-announce/2023/08/msg00003.html https://rubygems.org/gems/yajl-ruby • CWE-134: Use of Externally-Controlled Format String •