Skip to contentSkip to conversation

RO/NX protection for loadable kernel modules

DISCUSSION Kees Cook 1 participant 1 message Nov 6, 2010 Linux-next tree

lore
Share & tools
lore

Kees Cook

author
#0 lore raw

Peter, anyone? What is the state of this? I can see it in the tip tree, but it doesn't appear associated with a branch. What will it take to get this into Linus's tree?

http://git.kernel.org/?p=linux/kernel/git/x86/linux-2.6-tip.git;a=commitdiff;h=65187d24fa3ef60f691f847c792e8eaca7e19251

This feature is needed before the function-pointer const-ification patches will really have any meaning.

Thanks,

-Kees

Quoted 25 lines · Kees Cook
Quoted 14 lines · Rusty Russell
Quoted 13 lines · H. Peter Anvin
Quoted 11 lines · Rusty Russell
Quoted 8 lines · Siarhei Liakh

This patch is a logical extension of the protection provided by CONFIG_DEBUG_RODATA to LKMs. The protection is provided by splitting module_core and module_init into three logical parts each and setting appropriate page access permissions for each individual section:

1. Code: RO+X
2. RO data: RO+NX
3. RW data: RW+NX

Thanks, applied!

Quoted 7 lines
Quoted 2 lines

I also applied this to the -tip tree... do you prefer to carry it or should I leave it as is?

I'm always happy for you to do my work for me! There are no other module patches likely to conflict.

Sorry for losing track, but where did this patch end up? I don't see it in any of the trees I've looked in.

Signature · 2 lines
Kees Cook
Ubuntu Security Team