linux-security-module.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Possible mistake in commit 3ca459eaba1b ("tun: fix group permission check")
@ 2025-01-27  9:10 Ondrej Mosnacek
  2025-01-27 10:00 ` stsp
  0 siblings, 1 reply; 19+ messages in thread
From: Ondrej Mosnacek @ 2025-01-27  9:10 UTC (permalink / raw)
  To: Stas Sergeev, Willem de Bruijn, Jason Wang
  Cc: Jakub Kicinski, network dev, Linux Security Module list,
	SElinux list

Hello,

It looks like the commit in $SUBJ may have introduced an unintended
change in behavior. According to the commit message, the intent was to
require just one of {user, group} to match instead of both, which
sounds reasonable, but the commit also changes the behavior for when
neither of tun->owner and tun->group is set. Before the commit the
access was always allowed, while after the commit CAP_NET_ADMIN is
required in this case.

I'm asking because the tun_tap subtest of selinux-testuite [1] started
to fail after this commit (it assumed CAP_NET_ADMIN was not needed),
so I'm trying to figure out if we need to change the test or if it
needs to be fixed in the kernel.

Thanks,

[1] https://github.com/SELinuxProject/selinux-testsuite/

-- 
Ondrej Mosnacek
Senior Software Engineer, Linux Security - SELinux kernel
Red Hat, Inc.


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

end of thread, other threads:[~2025-02-06  3:04 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-27  9:10 Possible mistake in commit 3ca459eaba1b ("tun: fix group permission check") Ondrej Mosnacek
2025-01-27 10:00 ` stsp
2025-01-27 14:50   ` Willem de Bruijn
2025-01-27 14:58     ` stsp
2025-01-28 14:20     ` Ondrej Mosnacek
2025-01-28 14:45       ` stsp
2025-01-28 14:58         ` stsp
2025-01-28 15:04       ` Willem de Bruijn
2025-01-28 17:49         ` stsp
2025-01-28 22:59           ` Willem de Bruijn
2025-01-29  6:59             ` stsp
2025-01-29 14:12               ` Willem de Bruijn
2025-01-29 14:27                 ` stsp
2025-01-30 16:46                   ` Willem de Bruijn
2025-02-04  0:29                     ` Paul Moore
2025-02-04 16:18                       ` Ondrej Mosnacek
2025-02-04 19:40                         ` Paul Moore
2025-02-06  3:04                           ` Willem de Bruijn
2025-01-29 14:19       ` Willem de Bruijn

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).