Name | CVE-2024-27280 |
Description | A buffer-overread issue was discovered in StringIO 3.0.1, as distributed in Ruby 3.0.x through 3.0.6 and 3.1.x through 3.1.4. The ungetbyte and ungetc methods on a StringIO can read past the end of a string, and a subsequent call to StringIO.gets may return the memory value. 3.0.3 is the main fixed version; however, for Ruby 3.0 users, a fixed version is stringio 3.0.1.1, and for Ruby 3.1 users, a fixed version is stringio 3.0.1.2. |
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-3858-1, DSA-5677-1, ELA-1150-1 |
Debian Bugs | 1069966 |
The table below lists information on source packages.
Source Package | Release | Version | Status |
---|---|---|---|
ruby2.1 (PTS) | jessie, jessie (lts) | 2.1.5-2+deb8u14 | vulnerable |
ruby2.3 (PTS) | stretch (security) | 2.3.3-1+deb9u11 | vulnerable |
stretch (lts), stretch | 2.3.3-1+deb9u12 | vulnerable | |
ruby2.5 (PTS) | buster, buster (lts) | 2.5.5-3+deb10u7 | fixed |
buster (security) | 2.5.5-3+deb10u6 | vulnerable | |
ruby2.7 (PTS) | bullseye | 2.7.4-1+deb11u1 | vulnerable |
bullseye (security) | 2.7.4-1+deb11u2 | fixed | |
ruby3.1 (PTS) | bookworm (security), bookworm | 3.1.2-7+deb12u1 | fixed |
sid, trixie | 3.1.2-8.4 | vulnerable | |
ruby3.2 (PTS) | sid | 3.2.3-1 | fixed |
The information below is based on the following data on fixed versions.
Package | Type | Release | Fixed Version | Urgency | Origin | Debian Bugs |
---|---|---|---|---|---|---|
ruby2.1 | source | (unstable) | (unfixed) | |||
ruby2.3 | source | (unstable) | (unfixed) | |||
ruby2.5 | source | buster | 2.5.5-3+deb10u7 | ELA-1150-1 | ||
ruby2.5 | source | (unstable) | (unfixed) | |||
ruby2.7 | source | bullseye | 2.7.4-1+deb11u2 | DLA-3858-1 | ||
ruby2.7 | source | (unstable) | (unfixed) | |||
ruby3.1 | source | bookworm | 3.1.2-7+deb12u1 | DSA-5677-1 | ||
ruby3.1 | source | (unstable) | (unfixed) | 1069966 | ||
ruby3.2 | source | (unstable) | (not affected) |
- ruby3.2 <not-affected> (Fixed before initial upload to Debian)
https://www.ruby-lang.org/en/news/2024/03/21/buffer-overread-cve-2024-27280/
https://github.com/ruby/stringio/commit/a35268a3ac1b5f0058e5b7c1a041a7e86d9da067 (v3.0.3)
https://github.com/ruby/stringio/commit/c58c5f54f1eab99665ea6a161d29ff6a7490afc8 (v3.0.1.1)
Do not confuse with bugfix for https://bugs.ruby-lang.org/issues/19389:
https://github.com/ruby/stringio/commit/0e596524097706263d10900ca180898e4a8f5233 (v3.0.1.2)
[jessie] - ruby2.1 <ignored> (intrusive pre-requisites, PoC doesn't show infoleak)
[stretch] - ruby2.3 <ignored> (intrusive pre-requisites, PoC doesn't show infoleak)
ruby2.1: stringio.c changed significantly
ruby2.3: using buster's stringio.c doesn't fix the new tests, possibly relies on the many prior io.c changes
ruby2.3: the fix applies but doesn't fix the new tests (fail with or without the fix)
new tests fail but do not exhibit infoleak in ruby2.1/ruby2.3