[ubuntu-hardened] KASLR: enabling on x86 with "kaslr" option via '/etc/default/grub' file.
sidetripping at gmail.com
Wed Jul 19 16:41:15 UTC 2017
I would like to ask a question about Kernel Address Space Layout
Randomization - a mechanism, which can help to accomplish more security and
prevent kernel vulnerabilies exploits. KASLR is also randomizing the
location of the kernel code in RAM during boot time etc. However, this
feature has a conflict with Hibernation, right? (I'm using a desktop
computer, as a tester for various things, so it's not a problem for me.)
Last year, Mr Kees Cook created a bug report about enabling KASLR, by
default on x86 architecture (see 1.) It seems, that for x86/x86_64 systems,
this feature will be turned on, by default, in Linux kernel v4.12. For now,
I'm using v4.4.X and I would like to do some tests. One of the options to
enable Kernel Address Space Layout Randomization is to use "kaslr" as a
kernel command line option. I would like to make it another way.
I'm thinking about GRUB and '/etc/default/grub' file - that controls the
operation of grub-mkconfig(8). Generally, I want to skip pressing 'e'
button when menu shows up etc. There is one option:
"GRUB_CMDLINE_LINUX_DEFAULT=" containing "quiet splash" options. Can I
simply add "kaslr"at the very end? Then, I'll get: "quiet splash kaslr". Is
If this is a good way to enable KASLR, then I have to automatically
re-generate the 'grub.cfg' file, right? I know, that there are two commands
to do this: update-grub(8) and grub-mkconfig(8).
First one, is stub for grub-mkconfig (by the way; it uses "grub-mkconfig -o
/boot/grub/grub.cfg" command to automatically re-generate a config file.)
Second one, is used to generate a GRUB configuration file. That's all.
What do you think about this? Is this a correct way to enable "kaslr"
feature? Pretty naive question. Sorry, but I do not have the ability to
check this on my own - I do not have an access to any virtual machine right
Thanks, best regards.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the ubuntu-hardened