lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 21 Jan 2019 14:29:51 +0200
From:   Amir Goldstein <amir73il@...il.com>
To:     Mimi Zohar <zohar@...ux.ibm.com>
Cc:     Goldwyn Rodrigues <rgoldwyn@...e.de>,
        Ignaz Forster <iforster@...e.de>,
        linux-integrity <linux-integrity@...r.kernel.org>,
        linux-kernel <linux-kernel@...r.kernel.org>,
        Fabian Vogt <fvogt@...e.de>, Al Viro <viro@...iv.linux.org.uk>
Subject: Re: [PATCH v2] ima: define ima_post_create_tmpfile() hook and add
 missing call

On Mon, Jan 21, 2019 at 2:00 PM Mimi Zohar <zohar@...ux.ibm.com> wrote:
>
> On Thu, 2019-01-17 at 15:34 -0600, Goldwyn Rodrigues wrote:
> > On 13:47 18/12, Mimi Zohar wrote:
> > > If tmpfiles can be made persistent, then newly created tmpfiles need to
> > > be treated like any other new files in policy.
> > >
> > > This patch indicates which newly created tmpfiles are in policy, causing
> > > the file hash to be calculated on __fput().
> >
> > Discussed in overlayfs, this would be better if we use this on inode
> > and called from vfs_tmpfile() instead of do_tmpfile(). This will cover
> > the overlayfs case which uses tmpfiles while performing copy_up().
> > The patch is attached.
> >
> > Here is the updated patch which works for my cases.
> > However, it is the the failure case after setting the IMA flags
> > I am concerned about, though I don't think that should be as harmful.
>
> Right.  The new IMA hook allocates memory for storing the flags, which
> needs to be cleaned up on failure.  For this reason, the IMA call is
> deferred until after the transition from locally freeing memory on
> failure to relying on __fput().  In "do_last", the call to IMA is
> after "opened"; and in the original version of this patch the call to
> IMA is after finish_open().
>

Not sure I understand the concern.
The integrity context is associated with the inode and will be freed
on destroy_inode() no matter which error path is taken.
Am I missing something?

Thanks,
Amir.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ