Skip to contentSkip to conversation

strange daemon startup issue

DISCUSSION Russell Coker 2 participants 3 messages Mar 4, 2019

lore
Share & tools
lore
#0 lore raw

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.

Signature · 2 lines
My Main Blog         http://etbe.coker.com.au/
My Documents Blog    http://doc.coker.com.au/
#1 lore raw
Quoted 7 lines · Russell Coker

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.

Quoted 8 lines

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.

Signature · 3 lines
Key fingerprint = 5F4D 3CDB D3F8 3652 FBD8 02D5 3B6C 5F1D 2C7B 6B02
https://sks-keyservers.net/pks/lookup?op=get&search=0x3B6C5F1D2C7B6B02
Dominick Grift
#2 lore raw
In reply to Russell Coker
Quoted 7 lines · Russell Coker

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.

Quoted 8 lines

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.

Quoted 5 lines
Signature · 3 lines
-- 
My Main Blog         http://etbe.coker.com.au/
My Documents Blog    http://doc.coker.com.au/
Signature · 3 lines
Key fingerprint = 5F4D 3CDB D3F8 3652 FBD8 02D5 3B6C 5F1D 2C7B 6B02
https://sks-keyservers.net/pks/lookup?op=get&search=0x3B6C5F1D2C7B6B02
Dominick Grift