As per Consider Pulling in LKRG · Issue #408 · GrapheneOS/os-issue-tracker · GitHub, I believe we should get rid of the
--lkrg option and enable
CONFIG_KPROBES by default, while also disabling the config options mentioned in the issue to get rid of the attack surface exposed to user space.
Tirdad also requires kprobes:
Will also update documentation to reflect this.
Could you review Hardened-kernel: Difference between revisions - Whonix please?
Installed the Whonix hardened kernel on another distro and now some systemd services will not start. Don’t seem to be able to restart these services and when sudo systemctl start [service] is run, there is an error message which is described as exit-code. Also commands to the dbus seem to fail as well, returning
Failed to connect to bus: Connection Refused
Bunch of upcoming changes to spectre protection defaults and build time compiler options added to newer releases of LLVM and GCC. Sending pulls to other Linux projects may be helpful:
Difficult to understand what these changes do. A comment from the discussion thread frames it this way:
The question is, which programs in the past have opted in with PRCTL? Which in the future will be SECCOMP threads which will have it applied?
An AMD feature available in KVM for enhanced protection in Zen3 CPUs:
ClipOS is deprecated unfortunately;
"The paper points to AMD CPUs suffering from a side-channel leakage vulnerability through timing and power variations of the PREFETCH instruction. The paper argues that AMD CPUs should activate stronger page table isolation by default. "
“With the Linux kernel already supporting Kernel Page Table Isolation albeit not enabled by default on AMD CPUs, it’s easy to test the behavior otherwise. KPTI can already be forced on for AMD CPUs under Linux if booting with the “pti=on” kernel option (not to be confused with the “kpti=1” option that is for controlling page table isolation for AArch64 systems, unfortunately through a different knob).”
" For instance with GCC 11 is the zero-call-used-regs compiler feature and now with Linux 5.15 that feature can be optionally used to enhance the kernel security.
Slipping under our radar earlier this month was that GCC 12 has landed stack variable auto-initialization. This new GCC 12 security feature can be turned on with the “-ftrivial-auto-var-init=zero” compiler switch. LLVM/Clang saw this security option posted back in 2018."
I don;t know why they thought it was a good idea to include an in-kernel SMB3 file server that turned up vulnerabilities, but I’m sure we are all better off without it. This is a Linux 5.15 “feature” that we can turn off.
I think IMA integration is necessary
Integrity Measurement Architecture
This allows greater security although it is somewhat complex to be manually
inserting keys - openssl ,
I have worked on a script it is simple but it signs everything in
an automated way ( Extended Verification Module )
I could share the script but how do I send it , thanks
Linux kernel configuration for IMA
this security is built into the kernel,
Extended Verification Module
-# CONFIG_IMA_APPRAISE_SIGNED_INIT is not set !
Disable this line This causes the system to freeze
ima_policy=appraise_tcb ima_appraise=fix ima_policy=tcb ima_policy=secure_boot
ima_hash=sha512 appraise_flag=blacklist_ evm=fix
Linux IMA Extended Verification Module signing tools
Digital signature verification extension and audit measurement log support.
Package available in debian repository: ima-evm-utils
Which files/folders would be covered by that?
A hardened kernel is generally highly unlikely to happen anytime soon. There’s no actively maintained, Free and Open Source hardened kernel project which provides a Linux kernel compatible with Debian (stable) (and VMs).
There are too many configuration options. See this example.
And the Kicksecure or Whonix project doesn’t have resources to pay a kernel developer (most likely full time) to keep maintaining all of this (which includes figuring out which configuration option breaks what).
Kicksecure is certainly providing all the surrounding infrastructure (wiki, forums, APT repository) but cannot maintain the “core” for the hardened kernel.
Unfortunately, Linux doesn’t prioritize security and some sort of minimalism. It’s still the only realistic choice to work with however far form perfect.
A post was merged into an existing topic: Kernel Hardening - security-misc
A dangerous feature that’s useless unless your run a HCP cluster allows data to be directly sent to the Linux memory system from a system port. Ideally this shouldn’t see the light of day in a user kernel.
I am not sure which one requires what but if known:
- A) If kernel recompilation is required, please use this forum thread.
- B) If kernel recompilation is not required, please use Kernel Hardening - security-misc.
In fact Linux nowadays is ~99% commercial. It stopped being a hobby open source project in the late 90s. Desktop experience is some sort of compliment from the kernel hackers as it don’t pay the bills.