Blog

DBD::mysql のメンテナンス体制が変わっていた

レポジトリが https://github.com/perl5-dbi/DBD-mysql ここに変わっていた。

https://github.com/CaptTofu/DBD-mysql/issues/51 この issue は buffer overflow なので、ちょっとまあアレなんだけど2年前から放置されてて困ったなーと思っていたが、なんか新体制で別のレポジトリで解消されていた。

具体的には以下のようなコードで、バッファオーバーフロー発生していた。sprintf でエラーメッセージを生成している部分で、固定バッファ使ってるというわりとよくあるISSUE。

perl -MDBI -e 'DBI->connect("dbi:mysql:dbname=test", "root")->prepare("?")->bind_param(1, "2014-01-01 00:00", 4)'
2016-10-03 Patrick Galbraith, Michiel Beijen, DBI/DBD community (4.037)
* Security release to patch possible buffer overflow in unsafe sprintf with
  variable length. Reported and fixed by Pali Rohár. This vulnerability
  is present in all releases at least back to versions 3.0 of the
  driver, which were released in 2005.
  The CVE identifier for this vulnerability is CVE-2016-1246.

というわけで、4.037 以後にしておくのがオススメ。