[RFC PATCH v14 15/19] fsverity: consume builtin signature via LSM hook
Casey Schaufler
casey at schaufler-ca.com
Tue Mar 12 18:51:20 UTC 2024
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 at lists.linux.dev), not fscrypt
>>> (linux-fscrypt at vger.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?
>
> -Fan
>
More information about the Linux-security-module-archive
mailing list