Skip to content

gem install yajl-ruby on RHEL5 causes buffer overflow #89

auxesis opened this Issue Nov 8, 2011 · 7 comments

3 participants

auxesis commented Nov 8, 2011

This was originally reported to me on auxesis/visage#84:

auxesis/visage#84 (comment)

# gem install -V yajl-ruby
GET 302 Found:
GET 200 OK:
Installing gem yajl-ruby-1.0.0
*** buffer overflow detected ***: /usr/bin/ruby terminated
======= Backtrace: =========

I don't have a system to test, but I guess @slyall, @ccelebi or @Elwell maybe able to help out.

@auxesis auxesis referenced this issue in auxesis/visage Nov 8, 2011

gem install gives buffer overflow #84


Testing a gem install with -V locally shows the install appear to take these steps:

  1. check for and or download
  2. list the files in the gem (I assume this is just a verbose unpack of the gem)
  3. "Building native extensions. This could take a while..."
  4. show the path to extconf.rb
  5. "creating Makefile"
  6. output from make here
  7. output from make install here
  8. "1 gem installed"

Based on that, and looking at the output I assume things are bombing before or during step 2 in the process. Are either of you able to install the gem manually?

IE: download then run gem install -V yajl-ruby-1.0.0.gem

If that bombs in the same spot, it seems to point to a buggy tar implementation? Or possibly a corrupt .gem file? Definitely curious what the results of a "manual" install are.

Next step if that fails, is to clone down the repo and try building it yourself via:

  1. clone the repo
  2. cd into the repo, then run bundle install vendor/gems --binstubs
  3. run bin/rake compile

If that works, there's definitely something strange with the gem file or the tar executable itself.

Let me know what you find.

slyall commented Nov 8, 2011

Downloaded and tried a local install with same result:

$ md5sum yajl-ruby-1.0.0.gem
44c2c3d2f33c312cdf4afc234722bfd7 yajl-ruby-1.0.0.gem

$ gem install -V yajl-ruby-1.0.0.gem
*** buffer overflow detected ***: /usr/bin/ruby terminated
======= Backtrace: =========


I have to go home now but I'll try the next step tomorrow if nobody has done in the interum.


$ rpm -qa | grep ruby


Just noticed Ruby 1.8.5, forgot that ships with RHEL/CentOS... I thought I'd put it in the gemspec (just updated it) but yajl-ruby 1.0 should have required ruby 1.8.6 or higher. According to the latest version of ruby 1.8.5 (p231?) was released back in summer of 2008. I highly recommend upgrading to at least 1.8.7.


Just shipped yajl-ruby 1.1.0 which now requires ruby 1.8.6 or higher, give that a try and let me know if you have any issues

@brianmario brianmario closed this Nov 9, 2011
slyall commented Nov 10, 2011

Okay, the box is in Prod so it might be easier to install with RHEL/Centos 6 which has Ruby 1.8.7 rather than hacking in some backported version.

This will probably take me a while to arrange, I'll reopen/new ticket if problems on RHEL6

auxesis commented Nov 13, 2011

+1 to REE, I've done that before with great success:

Endpoint provide solid packages for RHEL5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.