lkml.org 
[lkml]   [2014]   [Oct]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [GIT PULL] Fix for Integrity subsystem null pointer deref
On Wed, Oct 29, 2014 at 11:36 AM, Dan Carpenter
<dan.carpenter@oracle.com> wrote:
> On Wed, Oct 29, 2014 at 09:23:45AM -0700, Andy Lutomirski wrote:
>> I have no idea what the semantics are. All I'm saying is that it
>> looks like the code still accesses memory past the end of the buffer.
>> The buffer isn't a null pointer, so the symptom is different, but it
>> may still be a security bug.
>>
>> --Andy
>
> It only reads one byte into the struct "xattr_data->type" so checking
> for non-zero is sufficient and the patch is fine.

Indeed. Still... eww. I don't like code that, upon local inspection,
is apparently wrong, even though it's coincidentally correct due to
some other far away condition.

--Andy

>
> I fixed that exact same bug in lustre last week where the xattr size is
> not zero but it's less than the size of the struct. So this seems like
> maybe it could be a common anti-pattern though.
>
> regards,
> dan carpenter
>



--
Andy Lutomirski
AMA Capital Management, LLC


\
 
 \ /
  Last update: 2014-10-29 20:21    [W:0.197 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site