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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 10 Dec 2019 15:23:01 -0800
From:   Lakshmi Ramasubramanian <nramas@...ux.microsoft.com>
To:     Mimi Zohar <zohar@...ux.ibm.com>, linux-integrity@...r.kernel.org
Cc:     eric.snowberg@...cle.com, dhowells@...hat.com,
        mathew.j.martineau@...ux.intel.com, matthewgarrett@...gle.com,
        sashal@...nel.org, jamorris@...ux.microsoft.com,
        linux-kernel@...r.kernel.org, keyrings@...r.kernel.org
Subject: Re: [PATCH v10 5/6] IMA: Add support to limit measuring keys

On 12/10/19 2:43 PM, Mimi Zohar wrote:

>> +static bool ima_match_keyring(struct ima_rule_entry *rule,
>> +			      const char *keyring, const struct cred *cred)
>> +{
>> +	char *keyrings, *next_keyring, *keyrings_ptr;
>> +	bool matched = false;
>> +
>> +	/* If "keyrings=" is not specified all keys are measured. */
> 
> With the addiitonal "uid" support this isn't necessarily true any
> more.
> 
> Mimi

Will move the check for uid ahead of the check for keyrings.

if ((rule->flags & IMA_UID) && !rule->uid_op(cred->uid, rule->uid))
	return false;

> 
>> +	if (!rule->keyrings)
>> +		return true;
>> +
>> +	if (!keyring)
>> +		return false;
>> +
>> +	if ((rule->flags & IMA_UID) && !rule->uid_op(cred->uid, rule->uid))
>> +		return false;
>> +

thanks,
  -lakshmi


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ