FS#46496 - kernel nx support not enabled by default (noexec kernel parameter)
Attached to Project:
Arch Linux
Opened by Georg (georgnix) - Wednesday, 30 September 2015, 14:36 GMT
Last edited by Doug Newgard (Scimmia) - Wednesday, 30 September 2015, 15:08 GMT
Opened by Georg (georgnix) - Wednesday, 30 September 2015, 14:36 GMT
Last edited by Doug Newgard (Scimmia) - Wednesday, 30 September 2015, 15:08 GMT
|
Details
Description:
By default the linux kernel command line does not enable x64 no-execute protection for memory pages. This can be checked by dmesg | grep NX With NX bit protection enabled one gets [ 0.000000] NX (Execute Disable) protection: active otherwise this line is missing. To add NX protection the linux command line needs to have noexec=on For GRUB this can be accomplished by adding "noexec=on" to the GRUB_CMDLINE_LINUX_DEFAULT variable in /etc/default/grub Additional info: * packages /etc/default/grub is part of the grub package, version(s) * TODO * other boot loaders config * x86 no-execute support |
This task depends upon
Closed by Doug Newgard (Scimmia)
Wednesday, 30 September 2015, 15:08 GMT
Reason for closing: Not a bug
Wednesday, 30 September 2015, 15:08 GMT
Reason for closing: Not a bug
If you want NX, please upgrade to x86_64.
$ uname -a; cat /proc/cmdline; dmesg | grep -w NX
Linux butter 4.2.2-1-ARCH #1 SMP PREEMPT Tue Sep 29 22:21:33 CEST 2015 x86_64 GNU/Linux
BOOT_IMAGE=../vmlinuz-linux root=LABEL=root rw console=ttyS0 initrd=../intel-ucode.img,../initramfs-linux.img
[ 0.000000] NX (Execute Disable) protection: active
There seems to be missing information from your bug report about the kernel you're running...
% uname -a
Linux gurke 4.1.6-1-ARCH #1 SMP PREEMPT Mon Aug 17 08:52:28 CEST 2015 x86_64 GNU/Linux
So no, I am not on i686.
% pacman -Q |grep linux
archlinux-keyring 20150605-1
lib32-util-linux 2.26.2-1
libutil-linux 2.26.2-1
linux 4.1.6-1
linux-api-headers 4.1.4-1
linux-firmware 20150722.e10097a-1
linux-headers 4.1.6-1
linuxtv-dvb-apps 1504-1
ttf-linux-libertine 5.3.0-3
util-linux 2.26.2-1
% pacman -Q |grep grub
grub 1:2.02.beta2-5
I have noxec now on the linux command line, after I added it to /etc/defaults/grub GRUB_CMDLINE_LINUX_DEFAULT
% cat /proc/cmdline
BOOT_IMAGE=/vmlinuz-linux root=UUID=a884660a-ce6e-4bd6-8c06-589647c41922 rw quiet root=/dev/mapper/gurke-root noexec=on
% uname -a; cat /proc/cmdline; dmesg | grep -w NX
Linux gurke 4.1.6-1-ARCH #1 SMP PREEMPT Mon Aug 17 08:52:28 CEST 2015 x86_64 GNU/Linux
BOOT_IMAGE=/vmlinuz-linux root=UUID=a884660a-ce6e-4bd6-8c06-589647c41922 rw quiet root=/dev/mapper/gurke-root
[ 0.000000] NX (Execute Disable) protection: active
I guess the kernel message buffer cycled -> no boot messages. Doh! Please close the bug and sorry for the noise.