Repository navigation
Provide the option to panic upon the kernel becoming tainted - #339
Conversation
|
Note this also connects to #328. Using |
|
This unfortunately conflicts with tirdad, which uses kernel live patching to replace some TCP ISN functions with more secure alternatives. This means enabling this option on a default installation of Kicksecure will result in an immediate panic on next boot. Looking at all available options:
Thoughts on the above? |
|
Great overview of potential options and yes you are definitely correct about kernel live patching. The important thing is I am currently only recommending this only as an optional since every user needs to test whether the settings are compatible with their existing setup. Thus for the time being I am hoping to have this included and then at a later stage begin enabling things by default. That aside, before going through your comments there is one thing that I think is a good idea. For the same reason we do not currently double enable panic on oopses and warnings, I do not think doing it with this setting should be done other. This will make disabling and debugging even more difficult since here we are dealing with a bitmask
Let me me know what you think. |
Good point, agreed.
Checked the kernel code, I agree with you now. I thought this would cause the system to panic any time the kernel did something that warranted a
This should be a "should not be allowed" for the same reason that panic on live-patch-induced taint should not be allowed, IMO.
At least on my laptop (a Clevo machine), ACPI code can be used to write directly to devices like the embedded controller, which could in theory allow one to overwrite arbitrary memory or even brick (some parts of) the hardware. I suspect most laptops are like this since the ACPI tables contain what are effectively driver components for some (many?) devices. If we're concerned about the use of MSRs to write arbitrary memory, I think disallowing custom ACPI code would also be a good idea. |
Agreed, my mistake. It has been updated.
Yes that makes sense, agreed. It has been updated. |
ArrayBolt3
left a comment
There was a problem hiding this comment.
Merged into my arraybolt3/trixie branch. I did make one change in the process that was non-trivial:
-## After confirming stability this enforces strict user-defined kernel operation and security at runtime.
+## After confirming stability this reduces attack surface.
This was to avoid users misunderstanding, and thinking that panic_on_taint enabled some sort of "formally verified" mode or similar ("enforces string user-defined kernel operation" was a bit stronger than I thought was accurate). Let me know if that's OK.
|
Yep I agree that your rewording is better so as not to give the presentation of a something more formal. Looks good to me! |
This pull request provides the option to panic upon the kernel becoming tainted.
After first testing, this can be used to enforce strict user-defined kernel operation and security at runtime. The exact subset selected is up to the user but in the presented default I have included panicking upon using out of specification hardware, bad page states, severe firmware bugs, and kernel live patching.
Given this is a comment-only PR, I do not see anything controversial with this as all it does is tell users that such a feature is available if they are first willing to test there are no problems prior to them being used as hardening features.
Please see references inside the commits and also the kernel docs.
Changes
There are no changes to the functionality of the codebase.
Provide the disabled by default option:
Mandatory Checklist
Terms of Service, Privacy Policy, Cookie Policy, E-Sign Consent, DMCA, Imprint
Optional Checklist
The following items are optional but might be requested in certain cases.