From: Dominick Grift <dominick.grift@defensec.nl>
To: selinux@vger.kernel.org
Subject: libselinux issue
Date: Tue, 31 Aug 2021 13:45:06 +0200 [thread overview]
Message-ID: <87czpthm7x.fsf@defensec.nl> (raw)
We can get into a state where selinux is enabled without a policy.
Reproducer:
cat > /etc/selinux/config <<EOF
ELINUX=disabled
SELINUXTYPE=blah
EOF
Further info:
Reproduced on Debian Bullseye
5.10.0-8-amd64
SELinux 3.1
Note that *both conditions* above have to be met to trigger this.
If you only have a typo "ELINUX=disabled" then SELinux will boot in
permissive mode
If you only have a type "SELINUXTYPE=blah" then SELinux will not be
enabled because the policy cannot be found
root@bullseye:~# sestatus
SELinux status: enabled
SELinuxfs mount: /sys/fs/selinux
SELinux root directory: /etc/selinux
Loaded policy name: dssp5
Current mode: permissive
Mode from config file: error (Success)
Policy MLS status: disabled
Policy deny_unknown status: denied
Memory protection checking: actual (secure)
Max kernel policy version: 33
root@bullseye:~# ls /sys/fs/selinux
access create mls ss
avc deny_unknown null status
booleans disable policy user
checkreqprot enforce policy_capabilities validatetrans
class initial_contexts policyvers
commit_pending_bools load reject_unknown
context member relabel
root@bullseye:~# ls /etc/selinux
config dssp5-debian semanage.conf
--
gpg --locate-keys dominick.grift@defensec.nl
Key fingerprint = FCD2 3660 5D6B 9D27 7FC6 E0FF DA7E 521F 10F6 4098
https://sks-keyservers.net/pks/lookup?op=get&search=0xDA7E521F10F64098
Dominick Grift
next reply other threads:[~2021-08-31 11:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-31 11:45 Dominick Grift [this message]
2021-08-31 11:51 ` libselinux issue Dominick Grift
2021-08-31 18:24 ` Christian Göttsche
2021-09-02 9:28 ` Petr Lautrbach
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87czpthm7x.fsf@defensec.nl \
--to=dominick.grift@defensec.nl \
--cc=selinux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.