Re: kernel BUG with 2.6.23-rc3-mm1: skb_over_panic

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Greg KH <greg@...>
Cc: Andrew Morton <akpm@...>, <linux-kernel@...>, Kay Sievers <kay.sievers@...>
Date: Friday, August 24, 2007 - 11:02 pm

* Greg KH (greg@kroah.com) wrote:

Hi Greg,

I think I am slowly getting there.. it looks like an off-by-one in
lib/kobject_uevent.c: add_uevent_var

when testing the return value of vsnprintf

if (len + 1 >= (sizeof(env->buf) - env->buflen))

should be

if (len >= (sizeof(env->buf) - env->buflen))

And then the problem underneath is that the array is too short for some
values. Since the return value of add_uevent_var is always ignored (why?)
from its callers, fixing the off-by-one will just fail silently, which is
almost worse.

I think we should find some better way of handling full static arrays.

And the bug is still there even if I fix these. So I'll continue my
investigation.

Mathieu

-- 
Mathieu Desnoyers
Computer Engineering Ph.D. Student, Ecole Polytechnique de Montreal
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
kernel BUG with 2.6.23-rc3-mm1: skb_over_panic, Mathieu Desnoyers, (Fri Aug 24, 6:47 pm)
Re: kernel BUG with 2.6.23-rc3-mm1: skb_over_panic, Andrew Morton, (Fri Aug 24, 7:10 pm)
Re: kernel BUG with 2.6.23-rc3-mm1: skb_over_panic, Mathieu Desnoyers, (Fri Aug 24, 8:16 pm)
Re: kernel BUG with 2.6.23-rc3-mm1: skb_over_panic, Andrew Morton, (Fri Aug 24, 8:44 pm)
Re: kernel BUG with 2.6.23-rc3-mm1: skb_over_panic, Randy Dunlap, (Fri Aug 24, 9:59 pm)
[PATCH] Fix kobject uevent string handling errors, Mathieu Desnoyers, (Sat Aug 25, 12:17 am)
Re: [PATCH] Fix kobject uevent string handling errors, Kay Sievers, (Sat Aug 25, 10:25 am)
Re: [PATCH] Fix kobject uevent string handling errors, Mathieu Desnoyers, (Sat Aug 25, 2:38 pm)
Re: kernel BUG with 2.6.23-rc3-mm1: skb_over_panic, Mathieu Desnoyers, (Fri Aug 24, 11:02 pm)
Re: kernel BUG with 2.6.23-rc3-mm1: skb_over_panic, Kay Sievers, (Fri Aug 24, 11:44 pm)
Re: kernel BUG with 2.6.23-rc3-mm1: skb_over_panic, Daniel Walker, (Fri Aug 24, 11:58 pm)
Re: kernel BUG with 2.6.23-rc3-mm1: skb_over_panic, Mathieu Desnoyers, (Fri Aug 24, 11:56 pm)
Re: kernel BUG with 2.6.23-rc3-mm1: skb_over_panic, Mathieu Desnoyers, (Fri Aug 24, 11:52 pm)
Re: kernel BUG with 2.6.23-rc3-mm1: skb_over_panic, Kay Sievers, (Fri Aug 24, 9:26 pm)