アカウント名:
パスワード:
19日にリリースされた 2.6.30.2 で対策されていました。2.6.18 系列へのバックポートはおそらく採用しているディストリビューションからリリースされているのでしょう。
commit 76f578b630347be522b6df7917013fd0712612e5Author: Eugene Teo Date: Wed Jul 15 14:59:10 2009 +0800
Add '-fno-delete-null-pointer-checks' to gcc CFLAGS
commit a3ca86aea507904148870946d599e07a340b39bf upstream.
Turning on this flag could prevent the compiler from optimising away some "useless" checks for null pointers. Such bugs can sometimes become exploitable at compile time because of the -O2 optimisation.
See http://gcc.gnu.org/onlinedocs/gcc-4.1.2/gcc/Optimize-Options.html [gnu.org]
An example that clearly shows this 'problem' is commit 6bf67672.
static void __devexit agnx_pci_remove(struct pci_dev *pdev) { struct ieee80211_hw *dev = pci_get_drvdata(pdev); - struct agnx_priv *priv = dev->priv; + struct agnx_priv *priv; AGNX_TRACE;
if (!dev) return; + priv = dev->priv;
By reverting this patch, and compile it with and without -fno-delete-null-pointer-checks flag, we can see that the check for dev is compiled away.
call printk # - testq %r12, %r12 # dev - je .L94 #, movq %r12, %rdi # dev,
Clearly the 'fix' is to stop using dev before it is tested, but building with -fno-delete-null-pointer-checks flag at least makes it harder to abuse.
より多くのコメントがこの議論にあるかもしれませんが、JavaScriptが有効ではない環境を使用している場合、クラシックなコメントシステム(D1)に設定を変更する必要があります。
日本発のオープンソースソフトウェアは42件 -- ある官僚
2.6.30.2 で対策 (スコア:4, 参考になる)
19日にリリースされた 2.6.30.2 で対策されていました。2.6.18 系列へのバックポートはおそらく採用しているディストリビューションからリリースされているのでしょう。
commit 76f578b630347be522b6df7917013fd0712612e5
Author: Eugene Teo
Date: Wed Jul 15 14:59:10 2009 +0800
Add '-fno-delete-null-pointer-checks' to gcc CFLAGS
commit a3ca86aea507904148870946d599e07a340b39bf upstream.
Turning on this flag could prevent the compiler from optimising away
some "useless" checks for null pointers. Such bugs can sometimes become
exploitable at compile time because of the -O2 optimisation.
See http://gcc.gnu.org/onlinedocs/gcc-4.1.2/gcc/Optimize-Options.html [gnu.org]
An example that clearly shows this 'problem' is commit 6bf67672.
static void __devexit agnx_pci_remove(struct pci_dev *pdev)
{
struct ieee80211_hw *dev = pci_get_drvdata(pdev);
- struct agnx_priv *priv = dev->priv;
+ struct agnx_priv *priv;
AGNX_TRACE;
if (!dev)
return;
+ priv = dev->priv;
By reverting this patch, and compile it with and without
-fno-delete-null-pointer-checks flag, we can see that the check for dev
is compiled away.
call printk #
- testq %r12, %r12 # dev
- je .L94 #,
movq %r12, %rdi # dev,
Clearly the 'fix' is to stop using dev before it is tested, but building
with -fno-delete-null-pointer-checks flag at least makes it harder to
abuse.