All of lore.kernel.org
 help / color / mirror / Atom feed
* [LSM Stacking] SELinux policy inside container affects a process on Host
@ 2023-07-06  5:12 Leesoo Ahn
  2023-07-06 13:43 ` Paul Moore
  0 siblings, 1 reply; 24+ messages in thread
From: Leesoo Ahn @ 2023-07-06  5:12 UTC (permalink / raw)
  To: Casey Schaufler, linux-security-module

Hello! Here is another weird behavior of lsm stacking..

test env
- Ubuntu 23.04 Ubuntu Kernel v6.2 w/ Stacking patch v38
- boot param: lsm=apparmor,selinux
- AppArmor (Host) + SELinux (LXD Container Fedora 36)

In the test environment mentioned above and applying selinux policy 
enforcing by running "setenforce 1" within the container, executing the 
following command on the host will result in "Permission denied" output.

root@stack-v6:/home/lsahn# insmod 
/lib/modules/6.2.0-20-generic/kernel/net/netfilter/nft_ct.ko
insmod: ERROR: could not insert module 
/lib/modules/6.2.0-20-generic/kernel/net/netfilter/nft_ct.ko: Permission 
denied

In dmesg, the following kernel log is displayed,

[  +0.000003] audit: type=1400 audit(1688619411.654:1072): avc:  denied 
{ module_load } for  pid=67703 comm="insmod" 
path="/usr/lib/modules/6.2.0-20-generic/kernel/net/netfilter/nft_ct.ko" 
dev="sda2" ino=1444804 scontext=system_u:system_r:kernel_t:s0 
tcontext=system_u:object_r:unlabeled_t:s0 tclass=system permissive=0

I have the following questions by the results:
- Why the policy applied within the container affects the host? and 
whether it is a bug or not.
- If this is a bug, I'm curious about where to start the analysis. It 
would be helpful if you could provide relevant resources or links.

best regards,
Leesoo

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2023-08-08 17:46 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-06  5:12 [LSM Stacking] SELinux policy inside container affects a process on Host Leesoo Ahn
2023-07-06 13:43 ` Paul Moore
2023-07-07  0:35   ` Serge E. Hallyn
2023-07-07  1:17     ` [LSM Stacking] SELinux policy inside container affects a processon Host Leesoo Ahn
2023-07-07  8:28   ` [LSM Stacking] SELinux policy inside container affects a process on Host Leesoo Ahn
2023-07-07 14:20     ` Paul Moore
2023-07-07 16:50       ` Casey Schaufler
2023-07-07 21:41         ` Paul Moore
2023-07-18 10:34         ` Dr. Greg
2023-07-18 17:20           ` Casey Schaufler
2023-07-19 18:45             ` Dr. Greg
2023-07-20  0:21               ` Casey Schaufler
2023-07-21 23:55                 ` Dr. Greg
2023-07-17 15:24       ` [LSM Stacking] SELinux policy inside container affects a processon Host Leesoo Ahn
2023-07-17 15:51         ` Casey Schaufler
2023-07-24  2:29           ` [LSM Stacking] SELinux policy inside container affects aprocesson Host Leesoo Ahn
2023-07-24 21:35             ` Casey Schaufler
2023-07-25  3:16               ` [LSM Stacking] SELinux policy inside container affects aprocessonHost Leesoo Ahn
2023-07-28  1:54       ` [LSM Stacking] SELinux policy inside container affects a processon Host Leesoo Ahn
2023-08-06 17:16         ` Dr. Greg
2023-08-06 19:25           ` Paul Moore
2023-08-08  6:40             ` Dr. Greg
2023-08-08 14:32               ` Paul Moore
2023-07-07 17:51     ` [LSM Stacking] SELinux policy inside container affects a process on Host Dr. Greg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.