f0rb1dd3n / Reptile

LKM Linux rootkit
2.53k stars 571 forks source link

Remove -fomit-frame-pointer in Kbuild #96

Open minhbq-99 opened 3 years ago

minhbq-99 commented 3 years ago

When kernel built with CONFIG_HARDENED_USERCOPY=y (like CentOS 7), check_stack_size will use frame point to check whether the kernel buffer in copy_from/to_user is on stack or not. If Reptile is built without frame pointer, check_stack_size with reach BAD_STACK case, which results in BUG()