lkml.org 
[lkml]   [2017]   [Apr]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] KEYS: fix dereferencing NULL payload with nonzero length
Date
Eric Biggers <ebiggers3@gmail.com> wrote:

> > > - if (_payload) {
> > > + if (plen) {
> >
> > "if (_payload && plen)" would be better.
> >
> > David
>
> No, that doesn't solve the problem. The problem is that userspace can pass
> in a NULL payload with nonzero length, causing the kernel to dereference a
> NULL pointer for some key types. For example:

Okay, in that case, I think there should be an else-statement that clears plen
if !_payload.

David

\
 
 \ /
  Last update: 2017-04-03 21:21    [W:0.130 / U:0.724 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site