linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: IMA: policy update LSM rules failed
       [not found] <AM6PR10MB240500A3E665DAA3807E0BF5C8D40@AM6PR10MB2405.EURPRD10.PROD.OUTLOOK.COM>
@ 2020-04-20 19:05 ` Mimi Zohar
  0 siblings, 0 replies; only message in thread
From: Mimi Zohar @ 2020-04-20 19:05 UTC (permalink / raw)
  To: Yiyang Su, Dmitry Kasatkin,
	James Morris <jmorris@namei.org>,
	linux-integrity, linux-security-module, linux-kernel

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 


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-04-20 19:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <AM6PR10MB240500A3E665DAA3807E0BF5C8D40@AM6PR10MB2405.EURPRD10.PROD.OUTLOOK.COM>
2020-04-20 19:05 ` IMA: policy update LSM rules failed Mimi Zohar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).