There was before no such code error. Cannot totally rule out yet but only happened after enabling sandboxing. I’ll see that I can provide instructions for reproduction.
I couldn’t reproduce this anymore. Perhaps I made a mistake and tested the wrong version. sdwdate sandboxing is re-enabled in Whonix developers, testers, and stable-proposed-updates repository.
Thank you for another great contribution!
sdwdate is getting killed on Debian
buster on the
How to debug systemd hardening? All I get:
sdwdate.service: Main process exited, code=killed, status=31/SYS
Any way to see a more specific error message which systemd hardening was violated? Any other way to debug other than trial and error which the offensive option is?
Got an answer on reddit.
sudo journalctl _AUDIT_TYPE_NAME=SECCOMP -f
May 05 06:29:26 whonix1 audit: SECCOMP auid=4294967295 uid=108 gid=118 ses=4294967295 subj==/usr/bin/sdwdate (enforce) pid=9740 comm=“sdwdate” exe=“/usr/bin/python3.7” sig=31 arch=c0000015 syscall=140 compat=0 ip=0x7fff96cc7df4 code=0x0
Found Chromium OS Docs - Linux System Call Table for a table to translate
Maybe a better table:
Linux system calls table for several architectures
sdwdate with the systemd unit name to debug.)
sudoedit /lib/systemd/system/sdwdate.service && sudo systemctl daemon-reload && sudo systemctl restart sdwdate && sudo systemctl --no-page status sdwdate
This is great, I will already try the new SystemCallFilter, and if it does not work on arm64, I’ll follow your debug steps and open a PR.
@Patrick opened fix systemd sandboxing for arm64 platform by GavinPacini · Pull Request #29 · Kicksecure/sdwdate · GitHub - this is working on arm64. Will handle onion-grater next.
Could you please try
sudo systemctl restart sdwdate after it succeeded once? Because first time its sets time using
date, subsequent ones using
sclockadj. Therefore it might work the first time but break later due to missing secomp whiltelisted syscalls.
I am not also wondering if removing/changing
SystemCallArchitectures setting would have been easier.
Also generally wondering if
SystemCallFilter is maintainable or will keep breaking when porting to the next version of Debian (
bullseye) or other platforms.
Oh, good catch, sorry for not checking that.
Opened another PR which now also works after restarting the service.
This is hard to expect.
Merged, and uploaded to Whonix developers repository.
@Patrick finally got time to check onion-grater
I did restart this a few time also. Anything else I should check?
Awesome, no, this one is straight forward to test.
@Patrick I realised that I missed one for sdwdate. The service started but the time never synched, now it does:
We could create multiple arch-specific syscall whitelists to avoid bloating one whitelist with another’s syscalls and use a postinst script to detect the arch and enable the appropriate one.
Seems quite complex but if that’s maintained, then OK.