buildroot.busybox.net archive mirror
 help / color / mirror / Atom feed
* [Buildroot] Troubles with SELinux
@ 2023-03-16 16:33 Jonathan Bittner
  2023-03-17 15:20 ` Jonathan Bittner
  0 siblings, 1 reply; 3+ messages in thread
From: Jonathan Bittner @ 2023-03-16 16:33 UTC (permalink / raw)
  To: buildroot


[-- Attachment #1.1: Type: text/plain, Size: 2124 bytes --]

I'm developing an embedded config on an Intel Atom board. It is a
government app and will go through vetting. Likely it will be compared to
the RedHat and Ubuntu Security Technical Implementation Guides (STIGs) as
there no specific embedded Linux STIGs.

That means I need features like iptables, displaying the government
computer warning message, preserved logs. and SELinux.

System parameters: busybox init, GUI via nodm and openbox, ext4 file
system, bootloader varies with both grub and syslinux (extlinux), sshd

I've found a few issues and fixed them with the help of audit2allow and
made a custom policy and loaded it to address some of the issues.  I think
there are some mislabels and confusion since the /var/run folder is on a
tmpfs (I tried to set a context in the fstab but that broke it worse).

On boot up, the auditd which helps so much with debugging SELinux can't
even run because it can't obtain permissions for its log files and .pid
file.  But after boot up, I can manually start it.  It might be because
restorecond runs AFTER auditd in the init order.  I also lose out on acpid
which starts earlier and it can't open it's socket (/run/acpid.socket).
Lack of early logging means I don't have enough info to add to the policy.
I've also tried to tweak /etc/selinux/restorecond.conf and move its init
script to earlier in the start up.

The system doesn't recognize /.autorelabel  and is also missing semanage
(python script not built, python hooks to libsemanage are needed even if it
was, they were deprecated in 2015)

Lastly, I can't log in via ssh as user as it can't determine my user's
default context.  Googling the error shows some results, many are decades
old.  I tried adding to the policy's local.users file but that didn't help.

I have root ssh logins working via public keys. I enabled the relevant
boolean and sshd_config values.

I wanted to see ask if anyone was actively using SELinux and was hoping you
could share some of your knowledge, tweaks, policies, and other hints.  I'm
especially interested in getting the labels correct on the image before
first boot.

Thanks,
Jonathan

[-- Attachment #1.2: Type: text/html, Size: 2450 bytes --]

[-- Attachment #2: Type: text/plain, Size: 150 bytes --]

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2023-03-18 21:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-16 16:33 [Buildroot] Troubles with SELinux Jonathan Bittner
2023-03-17 15:20 ` Jonathan Bittner
2023-03-18 21:43   ` Jonathan Bittner

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