Re:Kernel module for advanced rickrolling replaces open() call
by exDM69 on Thursday September 08, 2011 @04:44AM
(#2973133)
For the uninitiated, cr0 is a control register in the x86 family of processors. Bit 16 of that register is (according to wikipedia) WP - Write protect: Determines whether the CPU can write to pages marked read-only.
What this means is that the kernel can no longer see if a user is writing to a read-only location, which is a major part of memory protection. It has major security implications. I don't know whether other parts of the kernel enable or disable this at context switches or at other times.
What this also means is that this kernel module will only work on x86 CPU's. So no rickrolling you ARM boxes or smartphones.
Re:Kernel module for advanced rickrolling replaces open() call
by bstx on Thursday September 08, 2011 @10:44AM
(#2974082)
> What this means is that the kernel can no longer see if a user is writing to a read-only location, which is a major part of memory protection.
No, disabling WP in CR0 is only relevant for privileged code. Writes to write protected pages in user mode will still trap. It might mess up some in-kernel COW stuff though.
Re:Kernel module for advanced rickrolling replaces open() call
by adobriyan on Thursday September 08, 2011 @06:22AM
(#2973291)
If we could take CR0 et al manipulations away from module authors, we'd do it long ago. Sigh...
Re:Kernel module for advanced rickrolling replaces open() call
by jrockway on Thursday September 08, 2011 @07:11AM
(#2973386)
This is why I avoid out-of-tree modules. At least someone had to glance over the in-tree module before I run it on my machine. When you download random kernel modules from the Internet, they're probably from people too lazy to have their code properly reviewed. And if they're too lazy to have their code reviewed, they probably don't feel too bad about disabling all page write protection, either.
Re:Kernel module for advanced rickrolling replaces open() call
by KonradKlause on Thursday September 08, 2011 @07:29AM
(#2973431)
Can you name such a module?
is a absolute no-go. It's a nice and funny kernel module but it dooms the kernel's security.