Re: [GIT][IMA] fix null pointer deref

From: Mimi Zohar
Date: Sun Feb 07 2010 - 22:42:37 EST


Al Viro wrote on 02/07/2010 02:56:58 AM:

> On Sun, Feb 07, 2010 at 06:34:51PM +1100, James Morris wrote:
> > Linus,
> >
> > Please pull this bugfix. I've verified that it fixes the null pointer

> > deref.
>
> NAK. In that form it's simply wrong; we should never get there with
> NULL file->f_dentry->d_inode at all. This is papering over the real
> bug; I'll post a saner fix shortly.
>
> The real problem is BS hiding of ima_file_free() inside a hook, with
> condition that kinda-sorta happens to avoid bogus call most of the
> time.
>
> ima_path_check() side is also of BUG_ON() variety (and isn't triggered).

hm, there was quite a bit of discussion that IMA should be called from
the security hooks (refer to http://lkml.org/lkml/2009/6/7/279), so
commit 6c21a7f "LSM: imbed ima calls in the security hooks" moved them.

Mimi
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/