>The RewriteRule allows the attacker to control the initial part of the rewritten URL (for example if the substitution URL starts with $1) http://www.apache.org/dist/httpd/Announcement2.0.html
$1の話は例え話なんだね。他も対象って事みたい。
>If the compiler used to compile Apache HTTP Server has added padding to the stack immediately after the buffer being overwritten, it will not be possible to exploit this issue, and Apache HTTP Server will continue operating normally. http://www.apache.org/dist/httpd/Announcement2.0.html
CVE-2006-3747 対策 patch と CERT脆弱性ノート (スコア:5, 参考になる)
FreeBSD portsに入っているpatch [freebsd.org]をどうぞ。
あと、US-CERTからは、
Vulnerability Note VU#395412 [cert.org]がでています。
Re:CVE-2006-3747 対策 patch と CERT脆弱性ノート (スコア:3, 参考になる)
rewriteルールの中で
RewriteRule fred/(.*) $1
のような書き方が危険なのですね。
RewriteRule fred/(.*) joe/$1
だと、OKだとか。
それはそうと、rewriteモジュールって悪名高かったんですね。
Re:CVE-2006-3747 対策 patch と CERT脆弱性ノート (スコア:3, 参考になる)
http://www.apache.org/dist/httpd/Announcement2.0.html
$1の話は例え話なんだね。他も対象って事みたい。
>If the compiler used to compile Apache HTTP Server has added padding to the stack immediately after the buffer being overwritten, it will not be possible to exploit this issue, and Apache HTTP Server will continue operating normally.
http://www.apache.org/dist/httpd/Announcement2.0.html
って、きっとバッファオーバーフローって事だよな。
> RewriteRule .+ %{REQUEST_URI}.gz [last]
ってのだと、REQUEST_URIにゴミ詰められるとどうなるんだろう?
URI禁止文字の内、明らかに変なのが入っていても環境変数に入っているんだっけ?
RewriteCondで自分でチェックするんだっけ?
後の工程でも「.gz」付けただけなら問題無さそうな気もするけど。
バッファギリギリだと追加したから溢れる可能性あるんだろうか?
ふと、気になってしまった。
「joe/」付だと安全なのは何でなんだろうな?と思ってしまう。
想定より大きいの突っ込んだ時に問題が発生する気がするが、「joe/」だと小さくなるよな。()での$Nのサイズが小さいって話?いや、そんな単純な話じゃ無さそうだね。
とりあえず、アップデートすれば良いんだろうけど(俺は非公開のサーバーでしか使ってないけど)。
mod_rewriteは、やっぱ色々弄り回せる為、使うリスクを考えてしまうな。