Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 873664 (CVE-2016-2338) - dev-lang/ruby: heap buffer overflow
Summary: dev-lang/ruby: heap buffer overflow
Status: RESOLVED FIXED
Alias: CVE-2016-2338
Product: Gentoo Security
Classification: Unclassified
Component: Vulnerabilities (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Security
URL: http://www.talosintelligence.com/repo...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-09-30 15:17 UTC by John Helmert III
Modified: 2022-10-03 21:34 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Helmert III archtester Gentoo Infrastructure gentoo-dev Security 2022-09-30 15:17:15 UTC
CVE-2016-2338 (https://lists.debian.org/debian-lts-announce/2020/03/msg00032.html):

An exploitable heap overflow vulnerability exists in the Psych::Emitter start_document function of Ruby. In Psych::Emitter start_document function heap buffer "head" allocation is made based on tags array length. Specially constructed object passed as element of tags array can increase this array size after mentioned allocation and cause heap overflow.

So this is an issue made public all the way back in 2016, but of
course no apparent upstream report. Was this ever fixed upstream?
Comment 1 Hans de Graaff gentoo-dev Security 2022-10-02 17:12:50 UTC
Looks to be fixed in https://github.com/ruby/ruby/commit/cc0313436160b735a3d41361cb5e3eeb10fcbdad which should be in ruby 2.4 and later, and possible 2.3.

The POC in the original bug report runs fine for me without crashes.
Comment 2 John Helmert III archtester Gentoo Infrastructure gentoo-dev Security 2022-10-03 21:34:46 UTC
Thanks!