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] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 18 Dec 2013 14:23:10 -0800
From:	"Darrick J. Wong" <darrick.wong@...cle.com>
To:	Eric Sandeen <sandeen@...hat.com>
Cc:	tytso@....edu, linux-ext4@...r.kernel.org
Subject: Re: [PATCH 26/74] libss: fix memory handling errors

On Tue, Dec 17, 2013 at 11:04:15AM -0600, Eric Sandeen wrote:
> On 12/10/13, 7:21 PM, Darrick J. Wong wrote:
> > Fix memory allocation calculations and check for NULL pointer returns.
> > 
> > Signed-off-by: Darrick J. Wong <darrick.wong@...cle.com>
> > ---
> >  lib/ss/invocation.c  |    5 +++++
> >  lib/ss/parse.c       |    4 ++++
> >  lib/ss/request_tbl.c |    2 +-
> >  3 files changed, 10 insertions(+), 1 deletion(-)
> > 
> > 
> > diff --git a/lib/ss/invocation.c b/lib/ss/invocation.c
> > index a711050..08b66f2 100644
> > --- a/lib/ss/invocation.c
> > +++ b/lib/ss/invocation.c
> > @@ -20,6 +20,7 @@
> >  #ifdef HAVE_DLOPEN
> >  #include <dlfcn.h>
> >  #endif
> > +#include <errno.h>
> >  
> >  int ss_create_invocation(subsystem_name, version_string, info_ptr,
> >  			 request_table_ptr, code_ptr)
> > @@ -46,6 +47,10 @@ int ss_create_invocation(subsystem_name, version_string, info_ptr,
> >  		;
> >  	table = (ss_data **) realloc((char *)table,
> >  				     ((unsigned)sci_idx+2)*size);
> > +	if (table == NULL) {
> > +		*code_ptr = errno;
> > +		return 0;
> > +	}
> 
> According to coverity CID 295143, this leaks "new_table"
> 
> Just a free() before return would suffice I think.

All right, I'll send out a couple of cleanup patches in a bit.

--D
> 
> Thanks,
> -Eric
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ