Rpi Linux 3.13.7 + grsec kernel panic

Discuss and suggest new grsecurity features

Rpi Linux 3.13.7 + grsec kernel panic

Postby Aniem » Sun Mar 30, 2014 6:58 am

Hello, all.

I've been trying to install grsec on my Raspberry Pi with raspbian. I have used the downstream RPi Kernel branch 3.13.y available here : https://github.com/raspberrypi/linux/tree/rpi-3.13.y and the latest compatible patch from grsec.

After enabling grsec (only a few options) and a few debug options from the kernel, I see a kernel panic at boot. Here is the log : http://aniem.xelpaste.net/Tn6P#L55,86 I have highlighted the lines that seem relevant.
I have tested the same branch before applying the grsec patch, and the system boots up just well.

What I understand of it (I'm not a kernel dev, it's the first time I've took a look inside linux source, and I got help from a friend to understand what happened), the function __put_net adds into &net->cleanup_list elements that are already there, and therefore provoking (or would be if the kernel wouldn't Oops/panic) a double free.

If I deactivate CONFIG_NET_NS in the kernel config, this problem does not appear. (EDIT: But I still do not boot, and I don't have any info, I do not know if this is related. However, I know that the same unpatched kernel (but with CONFIG_NET_NS enabled) does boot correctly)

You will find here : https://cloud.aniem.fr/data/public/9b2b9a.php the config file (with CONFIG_NET_NS=n) used. If you set CONFIG_NET_NS to y and boot it up to a Raspberry Pi, you should be able to reproduce the bug.
Aniem
 
Posts: 1
Joined: Sun Mar 30, 2014 6:35 am

Return to grsecurity development