Debuging code causes slab coruption and locks warnings

Discuss usability issues, general maintenance, and general support issues for a grsecurity-enabled system.

Debuging code causes slab coruption and locks warnings

Postby Raf256 » Sun Jun 10, 2007 8:47 am

Hello, strange things happen when I build 2.6.21.x kernels with both grsecurity and debuging (in kernel hacking - like slab, VM, and locks debugging).

Some files are not visible in ls /etc yet /etc/the_file/ works (and it works after reboot; no, I didnt used RBAC etc)

I get errors:
Code: Select all
000: 78 30 2c f3 00 50 bc b7 00 70 bc b7 60 27 64 f5
010: 25 00 00 00 73 00 10 00 e4 2e 64 f5 00 00 00 00
Slab corruption: vm_area_struct start=ed12a3dc, len=88
Redzone: 0x5a2cf071/0x5a2cf071.
Last user: [<c01d7826>](vma_adjust+0x186/0x400)
010: 6b 6b 6b 6b 73 00 10 00 6b 6b 6b 6b 6b 6b 6b 6b
Prev obj: start=ed12a378, len=88
Redzone: 0x170fc2a5/0x170fc2a5.


when running memtest (application) and occassionally just from time to time when using computer.

On bootup I get some lock debugging warnings (but too early to have it in boot log AFAIK).
That is on 2.6.21.3.

2.6.21.4 doesnt boot up at all - hangs, usually with error in interrupt kernel panic.

All of the problems above vanish immediatelly when not using grsecurity patch on same kernel/config.

2.6.21.4 without grsecurity patch but with same debugging option works perfectyl.

http://www.limcore.com/misc/debug/grsec/0001/ - more inform about this problem including .config Sysmap and kernel image.
Raf256
 
Posts: 72
Joined: Mon Sep 19, 2005 8:38 pm

Postby Dr_Napalm » Sun Jun 10, 2007 10:28 am

This might help :)

Code: Select all
--- linux-2.6.20/drivers/media/video/pwc/pwc-uncompress.c~      2007-02-04 19:44:54.000000000 +0100
+++ linux-2.6.20/drivers/media/video/pwc/pwc-uncompress.c       2007-03-28 09:53:41.000000000 +0200
@@ -26,6 +26,7 @@
    vim: set ts=8:
 */
 
+#include <linux/cpu.h>
 #include <asm/current.h>
 #include <asm/types.h>
[/code]
Dr_Napalm
 
Posts: 14
Joined: Tue Sep 02, 2003 3:44 am

Postby Raf256 » Tue Jun 12, 2007 7:19 am

I think you pasted wrong code (in wrong forum thread?)
Raf256
 
Posts: 72
Joined: Mon Sep 19, 2005 8:38 pm

Re: Debuging code causes slab coruption and locks warnings

Postby PaX Team » Sun Jun 17, 2007 3:57 am

Raf256 wrote:Some files are not visible in ls /etc yet /etc/the_file/ works (and it works after reboot; no, I didnt used RBAC etc)
this one i couldn't reproduce, probably comes from grsec itself.
I get errors:
Code: Select all
000: 78 30 2c f3 00 50 bc b7 00 70 bc b7 60 27 64 f5
010: 25 00 00 00 73 00 10 00 e4 2e 64 f5 00 00 00 00
Slab corruption: vm_area_struct start=ed12a3dc, len=88
Redzone: 0x5a2cf071/0x5a2cf071.
Last user: [<c01d7826>](vma_adjust+0x186/0x400)
010: 6b 6b 6b 6b 73 00 10 00 6b 6b 6b 6b 6b 6b 6b 6b
Prev obj: start=ed12a378, len=88
Redzone: 0x170fc2a5/0x170fc2a5.


when running memtest (application) and occassionally just from time to time when using computer.
thanks to your reports, i managed to find and fix it, it's in the latest test patch already. if you don't want to wait for spender to return from the wonderful world of WoW (i should trademark WWoWoW and have him pay each time he's lost there ;P), you can just interdiff and apply the mm/mlock.c changes yourself.
On bootup I get some lock debugging warnings (but too early to have it in boot log AFAIK).
That is on 2.6.21.3.
this i couldn't reproduce either, but if you enlarge the kernel log buffer, you can capture it later in dmesg.
2.6.21.4 doesnt boot up at all - hangs, usually with error in interrupt kernel panic.
it works for me, so i'll need detailed logs (also, try PaX alone, now at 2.6.21.5).
PaX Team
 
Posts: 2310
Joined: Mon Mar 18, 2002 4:35 pm


Return to grsecurity support

cron