lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Mon, 9 Oct 2017 18:33:59 -0400
From:   Steven Rostedt <rostedt@...dmis.org>
To:     Michael Sartain <mikesart@...tmail.com>
Cc:     linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/5] trace-cmd: Fix NULL pointer being passed to memcpy

On Mon, 9 Oct 2017 16:27:10 -0600
Michael Sartain <mikesart@...tmail.com> wrote:

> > > -	memcpy(option->data, data, size);
> > > +
> > > +	/* Some IDs (like TRACECMD_OPTION_TRACECLOCK) pass NULL data */
> > > +	if (data)
> > > +		memcpy(option->data, data, size);  
> > 
> > Is this a problem, as when this happens, size should be zero. Does it
> > crash with data=NULL and size=0, or have you seen size not be zero?  
> 
> I got an ASAN warning, but you are correct - the size was 0 and it did
> not crash.

OK, but it's almost like dividing zero from zero. Can you send another
patch, but this time check if (size) instead of if (data).

-- Steve

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ