Page 1 of 1

kernel panic

PostPosted: Fri Feb 07, 2014 11:14 am
by rom2mars
Hello,

I have a problem with kernel panic when I try to communicate with my moxa driver.

The problem occurs only when the kernel is compiled with grsecurity.

Image

I use kernel 3.2.54

I use the moxa driver :
http://www.moxa.com/support/DownloadFil ... ort&id=952

regards,
Romain

Re: kernel panic

PostPosted: Fri Feb 07, 2014 12:29 pm
by PaX Team
can you somehow capture the full oops log? (serial or netconsole perhaps) also enable frame pointers for a better backtrace. if all else fails, you could try using a framebuffer console that can fit more information on the screen.

Re: kernel panic

PostPosted: Fri Feb 07, 2014 12:35 pm
by PaX Team
ok, after a very quick look i think this is the culprit in moxa/npreal2.c:npreal_net_write:

Code: Select all
if ((count = tty_insert_flip_string(tty, (unsigned char *)buf, cnt)))


if i'm not mistaken, buf is a userland provided pointer here and should go through copy_from_user or similar (like the other side of the #ifdef does) instead of being directly passed to tty_insert_flip_string. you probably had UDEREF enabled which catches these kinds of bugs (it's probably some kind of security bug too, better let upstream know).

Re: kernel panic

PostPosted: Fri Feb 14, 2014 8:39 am
by rom2mars
Thank you very much.