Project

General

Profile

Bug #5062

double free in OpenSSL::Engine

Added by ohai (Ippei Obayashi) almost 7 years ago. Updated almost 7 years ago.

Status:
Closed
Priority:
Normal
Target version:
ruby -v:
ruby 1.9.4dev (2011-07-20 trunk 32586) [x86_64-linux]
[ruby-dev:44173]

Description

以下のコードを実行すると終了時にglibcがdouble freeを検出して停止します。
require 'openssl'
OpenSSL::Engine.load
OpenSSL::Engine.engines
OpenSSL::Engine.engines
停止時の出力を添付します。

ENGINE_get_nextが前に返したengineのref countを下げるのが原因のようで、添付したパッチでとりあえず直ります。

engine_bug.log (5.9 KB) engine_bug.log ohai (Ippei Obayashi), 07/21/2011 02:49 AM
ossl_engine_doublefree.patch (406 Bytes) ossl_engine_doublefree.patch ohai (Ippei Obayashi), 07/21/2011 02:49 AM

Associated revisions

Revision 84e835fe
Added by emboss almost 7 years ago

  • ext/openssl/ossl_engine.c: Avoid double free of ENGINE reference.
  • test/openssl/test_engine.rb: Add a test for it. Thanks to Ippei Obayashi for providing the patch. [ Ruby 1.9 - Bug #5062 ]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32604 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 32604
Added by emboss almost 7 years ago

  • ext/openssl/ossl_engine.c: Avoid double free of ENGINE reference.
  • test/openssl/test_engine.rb: Add a test for it. Thanks to Ippei Obayashi for providing the patch. [ Ruby 1.9 - Bug #5062 ]

Revision 32604
Added by emboss almost 7 years ago

  • ext/openssl/ossl_engine.c: Avoid double free of ENGINE reference.
  • test/openssl/test_engine.rb: Add a test for it. Thanks to Ippei Obayashi for providing the patch. [ Ruby 1.9 - Bug #5062 ]

Revision 32604
Added by emboss almost 7 years ago

  • ext/openssl/ossl_engine.c: Avoid double free of ENGINE reference.
  • test/openssl/test_engine.rb: Add a test for it. Thanks to Ippei Obayashi for providing the patch. [ Ruby 1.9 - Bug #5062 ]

Revision 32604
Added by emboss almost 7 years ago

  • ext/openssl/ossl_engine.c: Avoid double free of ENGINE reference.
  • test/openssl/test_engine.rb: Add a test for it. Thanks to Ippei Obayashi for providing the patch. [ Ruby 1.9 - Bug #5062 ]

Revision 32604
Added by emboss almost 7 years ago

  • ext/openssl/ossl_engine.c: Avoid double free of ENGINE reference.
  • test/openssl/test_engine.rb: Add a test for it. Thanks to Ippei Obayashi for providing the patch. [ Ruby 1.9 - Bug #5062 ]

Revision ea74a92b
Added by emboss almost 7 years ago

  • backport r32604 from trunk.

  • ext/openssl/ossl_engine.c: Avoid double free of ENGINE reference.

  • test/openssl/test_engine.rb: Add a test for it.
    Thanks to Ippei Obayashi for providing the patch.
    [ Ruby 1.9 - Bug #5062 ]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32605 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

History

#1 [ruby-dev:44174] Updated by MartinBosslet (Martin Bosslet) almost 7 years ago

  • Status changed from Open to Assigned
  • Assignee set to MartinBosslet (Martin Bosslet)
  • Target version set to 1.9.3

Thanks Ippei,

I'll take a look at it!

#2 [ruby-dev:44178] Updated by kosaki (Motohiro KOSAKI) almost 7 years ago

  • Priority changed from Normal to 5

#3 Updated by Anonymous almost 7 years ago

  • Status changed from Assigned to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r32604.
Ippei, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


  • ext/openssl/ossl_engine.c: Avoid double free of ENGINE reference.
  • test/openssl/test_engine.rb: Add a test for it. Thanks to Ippei Obayashi for providing the patch. [ Ruby 1.9 - Bug #5062 ]

Also available in: Atom PDF