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: <4683E17A.3060706@kernel.org>
Date:	Thu, 28 Jun 2007 09:27:38 -0700
From:	Andrew Morgan <morgan@...nel.org>
To:	"Serge E. Hallyn" <serue@...ibm.com>
CC:	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

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Serge E. Hallyn wrote:
>>>>  		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.

I wasn't clear enough... Let me try again with different words.

If you look at your patch, you will see that the only use of the label
'clear_caps:' is as a jump target from a location in which rc=0. As
such, you will *not* clear the bprm->cap_* sets... This is the reverse
of what you intended to do.

You need to put the jump target 'inside' the 'if (rc) { <-here ... }'.

Cheers

Andrew
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGg+F6+bHCR3gb8jsRAm2AAJ9v0fz/S/+HvGWOhU6UBPbB4iY+MACggZqA
+yCrxg2UVKdDKOh6kPfh0QI=
=Qksf
-----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