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: <958966b6-9972-051f-a7d5-cd6d1beb3244@linux.microsoft.com>
Date:   Tue, 16 Jun 2020 08:43:31 -0700
From:   Lakshmi Ramasubramanian <nramas@...ux.microsoft.com>
To:     Steve Grubb <sgrubb@...hat.com>, Paul Moore <paul@...l-moore.com>
Cc:     Mimi Zohar <zohar@...ux.ibm.com>, rgb@...hat.com,
        linux-integrity@...r.kernel.org, linux-audit@...hat.com,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] integrity: Add errno field in audit message

On 6/16/20 8:29 AM, Steve Grubb wrote:

>>>>> The idea is a good idea, but you're assuming that "result" is always
>>>>> errno.  That was probably true originally, but isn't now.  For
>>>>> example, ima_appraise_measurement() calls xattr_verify(), which
>>>>> compares the security.ima hash with the calculated file hash.  On
>>>>> failure, it returns the result of memcmp().  Each and every code path
>>>>> will need to be checked.
>>>>
>>>> Good catch Mimi.
>>>>
>>>> Instead of "errno" should we just use "result" and log the value given
>>>> in the result parameter?
>>>
>>> That would likely collide with another field of the same name which is
>>> the
>>> operation's results. If it really is errno, the name is fine. It's
>>> generic
>>> enough that it can be reused on other events if that mattered.
>>
>> Steve, what is the historical reason why we have both "res" and
>> "result" for indicating a boolean success/fail?  I'm just curious how
>> we ended up this way, and who may still be using "result".
> 
> I think its pam and some other user space things did this. But because of
> mixed machines in datacenters supporting multiple versions of OS, we have to
> leave result alone. It has to be 0,1 or success/fail. We cannot use it for
> errno.

As Mimi had pointed out, since the value passed in result parameter is 
not always an error code, "errno" is not an appropriate name.

Can we add a new field, say, "op_result" to report the result of the 
specified operation?

thanks,
  -lakshmi


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ