-1

I have a custom application running on an embedded linux (generated with Buildroot). The kernel is patched with grsec and then, in the linux-menuconfig I enable GRsecurity. I haven't enable any more Grsec related options (except preventing code reuse).

Everything works fine, except that one application crashes with a coredump and causes a kernel panic.

I have tried the same application, without enabling Grsecurity in the kernel (but still patching the kernel) and it works fine.

The application, needs harware access through a special device (let's say /dev/mydev) and a module loaded at boot in a /etc/rc file.

My thoughts are that, maybe, grsec prevents or alter the load of the module, even though lsmod or modinfo shows correctly the module.

The most troubling thing, is that it is hard to get more info about this, as the kernel panic causes reboot of the device (so I can only read the last line of the messages).

Here is the error message:

worker_thread+0x58/0x490
process_one_work+0x3b0/0x3b0
kkthread_create_on_node+0x1b0/0x1b0

Any one knows if something needed to be configured in the kernel so any out of tree module could be loaded properly ?

I tried reading the official wikibook but most of it is about the RBAC which is not activated when I launch the application.

  • I would appreciate any feedback concerning the question as I've been downvoted. Just to be sure to not make the same mistake(s) in the future. Thanks :) – moria Oct 29 '18 at 12:37
0

It was tricky, but I found the source of the problem, even if I'm still trying to understand it.

So, there was an option the kernel configuration that was the activated by default: "prevent code reuse attacks". I deactivated it, and it worked fine.

I still trying to get a better understanding of what it actually does, but I am guessing it changes something of how shared libraries are used (maybe).

Anyway, deactivating it solved my problem. So I consider my problem solved.

More info: https://grsecurity.net/rap_faq.php

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.