Category: Python
PostgreSQLカンファレンス2008
June 3rd, 2008PostgreSQLカンファレンス2008が今週金曜日(6/6)に開催されます。
http://www.postgresql.jp/events/postgresql-conference-2008
例年通り参加費が必要ですが懇親会費込みです。
参加費:
カンファレンス ならび に懇親会 4,000 円
チュートリアルも含むカンファレンス ならびに 懇親会 10,000 円
今回のカンファレンスの目玉は色々ありますが、その一つはチュートリアルセッションです。まだ、空席が残っているようなのでライセンスもBSDでMySQLよりも使いやすいPostgreSQLを始めてみたい方には良いチャンスだと思います。新人研修の一環としても良いと思います。
* MySQLユーザのためのPostgreSQL入門
(リナックスアカデミー 学校長 濱野 賢一朗 氏)
興味がある方は是非カンファレンスにお越し下さい。
Python 2.5.3にリモートコード実行の可能性がある脆弱性
April 23rd, 2008最近CVEのコピー&ペーストが続いていますがこのブログに書いていた予想通りの展開なのでまたコピーです。
コアとはいえあまり重要ではない箇所の脆弱性ですが、Python 2.5.3にリモートコード実行の可能性がある脆弱性がレポートされています。
CVE-2008-1679
Overview
Multiple integer overflows in imageop.c in Python before 2.5.3 allow context-dependent attackers to cause a denial of service (crash) and possibly execute arbitrary code via crafted images that trigger heap-based buffer overflows. NOTE: this issue is due to an incomplete fix for CVE-2007-4965.
ImpactCVSS Severity (version 2.0):
CVSS v2 Base score: 6.8 (Medium) (AV:N/AC:M/Au:N/C:P/I:P/A:P) (legend)
Impact Subscore: 6.4
Exploitability Subscore: 8.6Access Vector: Network exploitable , Victim must voluntarily interact with attack mechanism
Access Complexity: Medium
Authentication: Not required to exploit
Impact Type: Provides unauthorized access, Allows partial confidentiality, integrity, and availability violation , Allows unauthorized disclosure of information , Allows disruption of service
直したつもりが直っていないのはよくある事です。直したはずだったCVE-2007-4965は以下の通りです。
CVE-2007-4965
Overview
Multiple integer overflows in the imageop module in Python 2.5.1 and earlier allow context-dependent attackers to cause a denial of service (application crash) and possibly obtain sensitive information (memory contents) via crafted arguments to (1) the tovideo method, and unspecified other vectors related to (2) imageop.c, (3) rbgimgmodule.c, and other files, which trigger heap-based buffer overflows.
Python 2.5.2以下に任意コード実行の脆弱性
April 22nd, 2008CVE登録されているので私がコピー&ペーストするまでもないですが、予想通りにPythonの脆弱性が出てきました。
CVE-2008-1887
Overview
Python 2.5.2 and earlier allows context-dependent attackers to execute arbitrary code via multiple vectors that cause a negative size value to provided to the PyString_FromStringAndSize function, which allocates less memory than expected when assert() is disabled and triggers a buffer overflow.
ImpactCVSS Severity (version 2.0):
CVSS v2 Base score: 7.5 (High) (AV:N/AC:L/Au:N/C:P/I:P/A:P) (legend)
Impact Subscore: 6.4
Exploitability Subscore: 10.0Access Vector: Network exploitable
Access Complexity: Low
Authentication: Not required to exploit
Impact Type: Provides unauthorized access, Allows partial confidentiality, integrity, and availability violation , Allows unauthorized disclosure of information , Allows disruption of service
こういう脆弱性にはSELinuxが役立ちます。
未知の脆弱性に対してはSELinuxなどが無いと守るのは難しいです。
SELinuxの効用はわざわざ書くほど事ではない、と思っていましたがMACにより未知の脆弱性に対する防御がある程度できる事を正しく理解されていない場合もあるようです。
SELlinuxなどを導入していれば任意コード実行が試みられても、auditログに記録されログ監視システムなどで攻撃を直ぐに検出できる可能性が高くなります。
サーバを守る側は多くのプログラムを安全に保つ事が要求されますが、サーバを攻撃する側はたった一つの致命的脆弱性か攻撃パスを見つければ良いだけです。サッカーのPK戦のゴールキーパーのように守る側の方が圧倒的に不利なゲームです。この不利なゲームを効果的に戦うにはSELinuxなどのフェイルセーフな仕組みが必要不可欠です。
ゴールに全面(任意コマンド実行攻撃の目標全て)に蓋をするくらいの効果はありませんが、ゴール面積の7割くらいに障害物を置くイメージに近いと思います。守りやすさは比べ物にならないです。
GoogleのPython採用と脆弱性情報の関係
April 11th, 2008GoogleがカスタムアプリケーションのホスティングにPythonを採用しました。これにより多くのセキュリティ研究者の研究対象がPythonに向けられ、PHPで報告されていたような問題がセキュリティ脆弱性して多数レポートされるようになるのではないか、と予想していました。
さっそくセキュリティ脆弱性が多く発見されるライブラリの一つであるzlibライブラリにお馴染みの脆弱性が報告されています。
CVE-2008-1721
Integer signedness error in the zlib extension module in Python 2.5.2 and earlier allows remote attackers to execute arbitrary code via a negative signed integer, which triggers insufficient memory allocation and a buffer overflow.
ImpactCVSS Severity (version 2.0):
CVSS v2 Base score: 7.5 (High) (AV:N/AC:L/Au:N/C:P/I:P/A:P) (legend)
Impact Subscore: 6.4
Exploitability Subscore: 10.0
負の整数が指定された場合が考慮されていないので攻略コードを埋め込まれた圧縮ファイルで任意コードが実行できるようです。よくあるタイプの脆弱性です。
しばらくは色々レポートされる事だと思います。
追記:
ところでこの脆弱性は未パッチです。
http://www.python.org/download/
の最新リリースは、現時点(4/14)でも、2/22日リリースされた2.5.2になっています。このページにはパッチへのリンクもありましたが、この脆弱性とは全く関係ないページが表示されていました。コメントにも書きましたが開発者がセキュリティに大きな注意を払っていない事を前提に対策を考える方が良いです。これは何もPythonやPHPに限った事ではありません。
参考
http://www.atmarkit.co.jp/news/200804/08/appengine.html
関連:
http://blog.ohgaki.net/php-1
http://blog.ohgaki.net/lamp
http://blog.ohgaki.net/lamp-p-php-perl-python-ruby
http://blog.ohgaki.net/lamp-4
追記:
予想通りの展開です。任意コード実行の脆弱性のCVEが公開されています。
http://blog.ohgaki.net/python-2-5-2
http://blog.ohgaki.net/python-2-5-3


