Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compile time flags hardening #298

Closed
adrelanos opened this issue Nov 10, 2023 · 2 comments
Closed

compile time flags hardening #298

adrelanos opened this issue Nov 10, 2023 · 2 comments
Labels
enhancement New feature or request question User support question

Comments

@adrelanos
Copy link
Contributor

hardening-check lkrg.ko 
 Position Independent Executable: not a known ELF type!? ()
 Stack protected: yes
 Fortify Source functions: no, only unprotected functions found!
 Read-only relocations: no, non-ELF (ignored)
 Immediate binding: no, non-ELF (ignored)
 Stack clash protection: unknown, no -fstack-clash-protection instructions found
 Control flow integrity: no, not found!

Would it make sense to add some compile time hardening flags to the Makefile?

@solardiz solardiz added enhancement New feature or request question User support question labels Nov 11, 2023
@solardiz
Copy link
Contributor

hardening-check lkrg.ko

You've checked a kernel module mostly for properties expected from a userspace program.

Would it make sense to add some compile time hardening flags to the Makefile?

Maybe, but like what? We generally need to build with the same flags that the kernel builds with, but maybe some compilers have specific desirable flags that we could reasonably detect and override in just one module. Do you have specific well-reasoned suggestions?

As things currently are, we actually have the opposite kind of problem - LKRG fails to work on kernels built with CFI enforcement (ARM BTI #183, Intel CET #272).

@solardiz
Copy link
Contributor

As far as I'm aware, there's currently nothing for us to do on this issue, so I'll close it. If it ever becomes actionable, we can reopen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question User support question
Projects
None yet
Development

No branches or pull requests

2 participants