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: <746a5548-0e98-4953-9e71-16b881c63aa8@linux.microsoft.com>
Date: Tue, 12 Mar 2024 12:08:49 -0700
From: Fan Wu <wufan@...ux.microsoft.com>
To: Casey Schaufler <casey@...aufler-ca.com>,
 Eric Biggers <ebiggers@...nel.org>
Cc: corbet@....net, zohar@...ux.ibm.com, jmorris@...ei.org, serge@...lyn.com,
 tytso@....edu, axboe@...nel.dk, agk@...hat.com, snitzer@...nel.org,
 eparis@...hat.com, paul@...l-moore.com, linux-doc@...r.kernel.org,
 linux-integrity@...r.kernel.org, linux-security-module@...r.kernel.org,
 linux-fscrypt@...r.kernel.org, linux-block@...r.kernel.org,
 dm-devel@...ts.linux.dev, audit@...r.kernel.org,
 linux-kernel@...r.kernel.org, Deven Bowers <deven.desai@...ux.microsoft.com>
Subject: Re: [RFC PATCH v14 15/19] fsverity: consume builtin signature via LSM
 hook



On 3/12/2024 11:51 AM, Casey Schaufler wrote:
> On 3/12/2024 11:14 AM, Fan Wu wrote:
>>
>>
>> On 3/11/2024 8:07 PM, Eric Biggers wrote:
>>> On Mon, Mar 11, 2024 at 07:57:12PM -0700, Eric Biggers wrote:
>>>>
>>>> As I've said before, this commit message needs some work.  It
>>>> currently doesn't
>>>> say anything about what the patch actually does.
>>>>
>>>> BTW, please make sure you're Cc'ing the fsverity mailing list
>>>> (fsverity@...ts.linux.dev), not fscrypt
>>>> (linux-fscrypt@...r.kernel.org).
>>>
>>> Also, I thought this patch was using a new LSM hook, but I now see
>>> that you're
>>> actually abusing the existing security_inode_setsecurity() LSM hook.
>>> Currently
>>> that hook is called when an xattr is set.  I don't see any precedent for
>>> overloading it for other purposes.  This seems problematic, as it
>>> means that a
>>> request to set an xattr with the name you chose
>>> ("fsverity.builtin-sig") will be
>>> interpreted by LSMs as the fsverity builtin signature.  A dedicated
>>> LSM hook may
>>> be necessary to avoid issues with overloading the existing xattr hook
>>> like this.
>>>
>>> - Eric
>>
>> Thanks for the suggestion. I found that using
>> security_inode_setsecurity() causes issues with SMACK's
>> inode_setsecurity() hook. I will crate a dedicated new hook like
>> security_inode_setsig() in the next version.
> 
> What is the issue you encountered with the Smack hook?
> 

The current hook call for saving file signature will fail at 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/security/smack/smack_lsm.c#n2855 
.

The issue is file signature size is larger than SMK_LONGLABEL so if 
SMACK is enabled the SMACK's hook will return -EINVAL, which prevents us 
to use security_inode_setsecurity() to save file signature into security 
blob.

We could also make security_inode_setsecurity() more generic instead of 
for xattr only, any suggestions?

-Fan



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ