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>] [day] [month] [year] [list]
Date:   Mon, 20 Apr 2020 15:05:49 -0400
From:   Mimi Zohar <zohar@...ux.ibm.com>
To:     Yiyang Su <suyiyang@...mail.com>,
        Dmitry Kasatkin <dmitry.kasatkin@...il.com>,
        "James Morris <jmorris@...ei.org>" 
        <IMCEASUPPORTER-SECURITY+20SUBSYSTEM@...PRD10.PROD.OUTLOOK.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>
Subject: Re: IMA: policy update LSM rules failed

On Mon, 2020-04-20 at 17:51 +0000, Yiyang Su wrote:
> Hello,
> 
> Current i am using Kernel 4.14.169 and trying to add some LSM rules such as "measure subj_user=_ func=FILE_CHECK mask=MAY_READ" into ima policy, but i cannot update the policy. Same happens by updating for subj_role, subj_type, obj_user, obj_role, and obj_type.
> 
> The issue can be produced:
> ###
> echo "measure subj_user=_ func=INODE_PERM mask=MAY_READ" > /sys/kernel/security/ima/policy
> sh: write error: Invalid argument
> IMA: policy update failed
> 
> [ 1558.886333] audit: type=1805 audit(1587051889.726:28): action="measure" subj_user="_" res=0
> [ 1558.903324] audit: type=1802 audit(1587051889.726:29): pid=255 uid=0 auid=4294967295 ses=4294967295 op="update_policy" cause="invalid-policy" comm="sh" res=0
> [ 1558.917414] audit: type=1300 audit(1587051889.726:29): arch=40000028 syscall=4 per=800000 success=no exit=-22 a0=1 a1=aab98 a2=32 a3=0 items=0 ppid=1 pid=255 auid=4294967295 uid=0 gid=0 euid=0 suid=0 )
> [ 1558.945176] audit: type=1327 audit(1587051889.726:29): proctitle="-sh"
> [ 1558.951699] audit: type=1802 audit(1587051889.736:30): pid=255 uid=0 auid=4294967295 ses=4294967295 op="policy_update" cause="failed" comm="sh" res=0
> ###
> 
> But there is no problem to update a rule such as "measure fowner=55"
> ###
> echo "measure fowner=55" > /sys/kernel/security/ima/policy
> IMA: policy update completed
> ###
> 
> The kernel option CONFIG_IMA_LSM_RULES=y is enabled.

Perhaps the difference isn't the LSM options, but the "func="
definition?  I've never seen "func=INODE_PERM".

Mimi 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ