lkml.org 
[lkml]   [2009]   [Jun]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] Staging: prevent rtl8187se from crashing dev_ioctl() in SIOCGIWNAME
Date
On Saturday 20 June 2009 15:32:22 Dan Aloni wrote:
> I repeatedly get __stack_chk_fail panic()s with this driver before
> applying the attached fix.
>
> ieee80211_wx_get_name() ignores sizeof(wrqu->name) which is IFNAMSIZ (16), and
> on certain conditions, the concatenated string will be larger than IFNAMSIZ
> including the terminating zero.
>
> length ("802.11" ++ "b" ++ "/g" ++ " linked" ++ "\x00") == 17
>
> This fix uses strl{cpy,cat} in addition to the reduction of the total
> possible length of the output string by a char.
>
> It can be applied to 2.6.30-stable as well.

Recently added rtl8192su driver seems to also need it, care to port the fix?
(http://patchwork.kernel.org/patch/29630/ is needed to build rtl8192su ATM)


\
 
 \ /
  Last update: 2009-06-20 22:49    [from the cache]
©2003-2011 Jasper Spaans