linuxppc / issues

Issues repository for linuxppc
5 stars 0 forks source link

Implement kernel stack randomization for interrupts #418

Open npiggin opened 2 years ago

npiggin commented 2 years ago

syscalls recently gained kernel stack randomization

https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/commit/?id=f4a0318f278d98d9492916722e85f258c2221f88

But interrupts can also be directly controllable and/or predictable by userspace, if not quite such a big attack surface. We could implement kernel stack randomization on interrupt as well. Kees didn't call it a horrible idea:

https://lists.ozlabs.org/pipermail/linuxppc-dev/2022-May/243238.html

rohanmclure commented 2 years ago

Looks like a straight-forward implementation is to perform the add_random_kstack_offset() and choose_random_kstack_offset() calls from the DEFINE_INTERRUPT_HANDLER* macros.