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]
Message-ID: <20070628134702.GB29641@sergelap.austin.ibm.com>
Date:	Thu, 28 Jun 2007 08:47:02 -0500
From:	"Serge E. Hallyn" <serue@...ibm.com>
To:	Andrew Morgan <morgan@...nel.org>
Cc:	"Serge E. Hallyn" <serue@...ibm.com>,
	Chris Wright <chrisw@...s-sol.org>,
	Andrew Morgan <agm@...gle.com>, casey@...aufler-ca.com,
	Andrew Morton <akpm@...gle.com>,
	Stephen Smalley <sds@...ho.nsa.gov>,
	KaiGai Kohei <kaigai@...gai.gr.jp>,
	James Morris <jmorris@...ei.org>,
	linux-security-module@...r.kernel.org,
	lkml <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/1] file capabilities: get_file_caps cleanups

Quoting Andrew Morgan (morgan@...nel.org):
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> This contains a typo:
> 
> Serge E. Hallyn wrote:
> >>From 588755d9498c87c4e963527ba0f49c11107de354 Mon Sep 17 00:00:00 2001
> > From: Serge E. Hallyn <serue@...ibm.com>
> > Date: Wed, 27 Jun 2007 19:55:27 -0400
> > Subject: [PATCH 1/1] file capabilities: get_file_caps cleanups
> > 
> > Two cleanups relating to set_file caps.
> [...]
> > @@ -187,12 +186,21 @@ out:
> >  	dput(dentry);
> >  	if ((void *)dcaps != (void *)&v1caps)
> >  		kfree(dcaps);
> Move this two lines down (rc defaults to 0 in goto above):
> from here-->
> > +clear_caps:
> > +	if (rc) {
> to here-->

Hmm?  But if we succeeded we still want to free dcaps if we
kmalloc()'d it.

If we didn't kmalloc it, dcaps==v1caps and it won't be freed.

thanks,
-serge

> > +		cap_clear (bprm->cap_inheritable);
> > +		cap_clear (bprm->cap_permitted);
> > +		cap_clear (bprm->cap_effective);
> > +	}
> >  	return rc;
> 
> Cheers
> 
> Andrew
> 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.6 (GNU/Linux)
> 
> iD8DBQFGg1DNQheEq9QabfIRApNqAJ99rNMF4VU/FPOolDLHlXbbQ2MRMwCeO3Fy
> 8ze7XhlBuBKdHElbZmWFJ5Y=
> =gAEK
> -----END PGP SIGNATURE-----
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ