selinux-refpolicy.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* strange daemon startup issue
@ 2019-03-04 13:29 Russell Coker
  2019-03-04 13:34 ` Dominick Grift
  2019-03-04 13:59 ` Dominick Grift
  0 siblings, 2 replies; 3+ messages in thread
From: Russell Coker @ 2019-03-04 13:29 UTC (permalink / raw)
  To: selinux-refpolicy

When I boot kernel 4.9.144 (Debian/Stable kernel) with the Debian policy for 
Unstable (which isn't very different to the latest Git refpolicy) /usr/sbin/
ModemManager and /usr/sbin/mysqld run as init_t.

When I boot the same policy with kernel 4.19.16 (Debian/Testing kernel) those 
daemons run in modemmanager_t and mysqld_t as desired.

What is the difference between those kernels which would explain this?  Would 
it be some interaction with systemd?  I don't expect anyone to just hand me 
the answer (although that would be really nice), any clues as to where I 
should start investigating this would be great.

The general aim with Debian SE Linux is that you can run the policy with the 
kernel from the previous version of Debian.  So this is something I really 
want to fix.

-- 
My Main Blog         http://etbe.coker.com.au/
My Documents Blog    http://doc.coker.com.au/


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

* Re: strange daemon startup issue
  2019-03-04 13:29 strange daemon startup issue Russell Coker
@ 2019-03-04 13:34 ` Dominick Grift
  2019-03-04 13:59 ` Dominick Grift
  1 sibling, 0 replies; 3+ messages in thread
From: Dominick Grift @ 2019-03-04 13:34 UTC (permalink / raw)
  To: Russell Coker; +Cc: selinux-refpolicy

Russell Coker <russell@coker.com.au> writes:

> When I boot kernel 4.9.144 (Debian/Stable kernel) with the Debian policy for 
> Unstable (which isn't very different to the latest Git refpolicy) /usr/sbin/
> ModemManager and /usr/sbin/mysqld run as init_t.
>
> When I boot the same policy with kernel 4.19.16 (Debian/Testing kernel) those 
> daemons run in modemmanager_t and mysqld_t as desired.
>
> What is the difference between those kernels which would explain this?  Would 
> it be some interaction with systemd?  I don't expect anyone to just hand me 
> the answer (although that would be really nice), any clues as to where I 
> should start investigating this would be great.
>
> The general aim with Debian SE Linux is that you can run the policy with the 
> kernel from the previous version of Debian.  So this is something I really 
> want to fix.

Could it be the nnp_nosuid_transition polcap? Not sure when that was
exactly introduced but that change does affect domain transitions.

-- 
Key fingerprint = 5F4D 3CDB D3F8 3652 FBD8 02D5 3B6C 5F1D 2C7B 6B02
https://sks-keyservers.net/pks/lookup?op=get&search=0x3B6C5F1D2C7B6B02
Dominick Grift

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

* Re: strange daemon startup issue
  2019-03-04 13:29 strange daemon startup issue Russell Coker
  2019-03-04 13:34 ` Dominick Grift
@ 2019-03-04 13:59 ` Dominick Grift
  1 sibling, 0 replies; 3+ messages in thread
From: Dominick Grift @ 2019-03-04 13:59 UTC (permalink / raw)
  To: Russell Coker; +Cc: selinux-refpolicy

[-- Attachment #1: Type: text/plain, Size: 1840 bytes --]

On Tue, Mar 05, 2019 at 12:29:45AM +1100, Russell Coker wrote:
> When I boot kernel 4.9.144 (Debian/Stable kernel) with the Debian policy for 
> Unstable (which isn't very different to the latest Git refpolicy) /usr/sbin/
> ModemManager and /usr/sbin/mysqld run as init_t.
> 
> When I boot the same policy with kernel 4.19.16 (Debian/Testing kernel) those 
> daemons run in modemmanager_t and mysqld_t as desired.
> 
> What is the difference between those kernels which would explain this?  Would 
> it be some interaction with systemd?  I don't expect anyone to just hand me 
> the answer (although that would be really nice), any clues as to where I 
> should start investigating this would be great.
> 
> The general aim with Debian SE Linux is that you can run the policy with the 
> kernel from the previous version of Debian.  So this is something I really 
> want to fix.

If its the nnp transition polcap then you have some options:

1. easiest is to remove the references to "NoNewPrivileges=" in systemd service units. Hopefully in these old versions of systemd this directive is not implied by other widely used directives.
I recall that back then I got away with this solution, at least untill the polcap was introduced.

2. hard and ugly: before the polcap was introduced, NNP was covered with type bounds. (see selinux_err messages on older kernels)
This can get ugly really fast though as the NNP flag is inherited. Probably best to avoid this option, but in theory it is possible to address this issue with type bounds.

> 
> -- 
> My Main Blog         http://etbe.coker.com.au/
> My Documents Blog    http://doc.coker.com.au/
> 

-- 
Key fingerprint = 5F4D 3CDB D3F8 3652 FBD8 02D5 3B6C 5F1D 2C7B 6B02
https://sks-keyservers.net/pks/lookup?op=get&search=0x3B6C5F1D2C7B6B02
Dominick Grift

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

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

end of thread, other threads:[~2019-03-04 13:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-04 13:29 strange daemon startup issue Russell Coker
2019-03-04 13:34 ` Dominick Grift
2019-03-04 13:59 ` Dominick Grift

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