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]
Message-ID: <bd953894da3041d5969da645db2f982e@huawei.com>
Date:   Tue, 20 Jul 2021 12:38:43 +0000
From:   Roberto Sassu <roberto.sassu@...wei.com>
To:     Mimi Zohar <zohar@...ux.ibm.com>,
        "paul@...l-moore.com" <paul@...l-moore.com>
CC:     "stephen.smalley.work@...il.com" <stephen.smalley.work@...il.com>,
        "prsriva02@...il.com" <prsriva02@...il.com>,
        "tusharsu@...ux.microsoft.com" <tusharsu@...ux.microsoft.com>,
        "nramas@...ux.microsoft.com" <nramas@...ux.microsoft.com>,
        "linux-integrity@...r.kernel.org" <linux-integrity@...r.kernel.org>,
        "linux-security-module@...r.kernel.org" 
        <linux-security-module@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "selinux@...r.kernel.org" <selinux@...r.kernel.org>
Subject: RE: [PATCH v3 2/3] ima: Return int in the functions to measure a
 buffer

> From: Mimi Zohar [mailto:zohar@...ux.ibm.com]
> Sent: Monday, July 19, 2021 10:28 PM
> Hi Roberto,
> 
> On Mon, 2021-07-05 at 11:09 +0200, Roberto Sassu wrote:
> > ima_measure_critical_data() and process_buffer_measurement() currently
> > don't return a result. A caller wouldn't be able to know whether those
> > functions were executed successfully.
> 
> Missing is an explanation as to why these functions aren't currently
> returning a result.   The LSM/IMA hooks only return a negative result
> for failure to appraise a file's integrity, not measure a file.  Only
> failure to appraise a file's integrity results in preventing the file
> from being read/executed/mmaped.  Other failures are only audited.

Hi Mimi

ok, will add it.

> > This patch modifies the return type from void to int, and returns 0 if the
> > buffer has been successfully measured, a negative value otherwise.
> 
> Needed here is an explanation as to why ima_measure_critical_data() is
> special.

We don't want to unnecessarily calculate the digest twice.

> > Also, this patch does not modify the behavior of existing callers by
> > processing the returned value. For those, the return value is ignored.
> 
> I agree that the existing behavior shouldn't change, but will this
> result in the bots complaining?

If I remember correctly, I didn't get any error even with W=1.

Thanks

Roberto

HUAWEI TECHNOLOGIES Duesseldorf GmbH, HRB 56063
Managing Director: Li Peng, Li Jian, Shi Yanli

> thanks,
> 
> Mimi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ