Re: 2.6.28-rc6-git1 -- BUG: unable to handle kernel paging requestat ffff8800be8b0019

From: Pekka Enberg
Date: Fri Nov 28 2008 - 02:55:33 EST


On Thu, 2008-11-27 at 17:34 +0000, Hugh Dickins wrote:
> An alternative quick just-for-now fix might be to remove that
> namebuf[KSYM_NAME_LEN - 1] = 0;
> from kallsyms_lookup(): as I understand it (please check), that
> could only make sense in cases where the symbol is KSYM_NAME_LEN
> long or longer - in which case, all of the places fixed in the
> patch below would be causing corruption already, even without my
> patch. I think. Maybe that "= 0" even serves no purpose at all?

I looked into this and unfortunately that won't help us. For example,
module_address_lookup() will copy KSYM_NAME_LEN - 1 bytes to namebuf
anyway so we'll overflow the buffer.

It would probably be a good idea to add a comment to kallsyms_lookup()
stating that namebuf needs to have at least KSYM_NAME_LEN bytes
available.

Pekka

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/