From: "Andrew G. Morgan" <morgan@kernel.org>
To: Chris Wright <chrisw@sous-sol.org>
Cc: Dave Jones <davej@codemonkey.org.uk>,
Linux Kernel <linux-kernel@vger.kernel.org>,
bojan@rexursive.com, "Serge E. Hallyn" <serue@us.ibm.com>,
Andrew Morton <akpm@linux-foundation.org>,
Linux Security Modules List
<linux-security-module@vger.kernel.org>
Subject: Re: capget() overflows buffers.
Date: Fri, 23 May 2008 21:40:40 -0700 [thread overview]
Message-ID: <48379C48.5020802@kernel.org> (raw)
In-Reply-To: <20080524010923.GT30402@sequoia.sous-sol.org>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Chris Wright wrote:
| Hmm, it would be kind of nice to have a formalized way get the size,
| perhaps it would help with KaiGai's request for caps printed out.
| Something that tells us either the number of u32s, or the max bit
| supported?
Serge has already provided one with the call,
~ sys_prctl(PR_CAPBSET_READ, x);
returns -EINVAL if (x > max-supported-capability).
(Ref: 3b7391de67da515c91f48aa371de77cb6cc5c07e)
|> | All looks good. I think we need to issue some warnings, because
|> | at least Fedora 9 and openSUSE 11 are/will be 2.6.25 based.
|>
|> Do any of the above answers help? (FWIW I attached the patch to the
|> redhat bug.)
|
| Yes, thanks. But I still think we need to print a warning (unfortunately
| we can't distinguish libcap from non-libcap app), because apps that
| aren't using libcap should really be updated (either pull new update
| from vendor or recompiled by end user).
Just to be clear, you are not referring to a warning that the
application is stuck in a 32-bit capability world, because we already
have one of those: warn_legacy_capability_use(). You are referring to a
warning that might indicate a problem with code like that given in your
example - in which case I'll respond to that part of the thread...
Cheers
Andrew
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
iD8DBQFIN5xI+bHCR3gb8jsRAsz6AKDHOeOO8953r2bRJ3RXZaRdBnlGUwCdG3oX
CvWy/iQVmfVdpeRIWLa7N/w=
=R7Bq
-----END PGP SIGNATURE-----
next prev parent reply other threads:[~2008-05-24 4:40 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-22 14:04 capget() overflows buffers Dave Jones
2008-05-22 17:58 ` Chris Wright
2008-05-22 20:53 ` Chris Wright
2008-05-22 22:52 ` Andrew G. Morgan
2008-05-22 23:37 ` Chris Wright
2008-05-23 7:09 ` Andrew G. Morgan
2008-05-23 15:57 ` Chris Wright
2008-05-24 6:25 ` Andrew G. Morgan
2008-05-24 8:07 ` Chris Wright
2008-05-27 1:17 ` [PATCH] security: was "Re: capget() overflows buffers." Andrew G. Morgan
2008-05-27 21:42 ` Chris Wright
2008-05-28 3:33 ` Andrew Morton
2008-05-23 18:26 ` capget() overflows buffers Chris Wright
2008-05-24 0:02 ` Andrew G. Morgan
2008-05-24 1:09 ` Chris Wright
2008-05-24 4:40 ` Andrew G. Morgan [this message]
2008-05-24 8:17 ` Chris Wright
2008-05-23 1:20 ` Bojan Smojver
2008-05-23 2:06 ` Chris Wright
2008-05-23 4:01 ` Bojan Smojver
2008-05-22 21:20 ` Bojan Smojver
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=48379C48.5020802@kernel.org \
--to=morgan@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=bojan@rexursive.com \
--cc=chrisw@sous-sol.org \
--cc=davej@codemonkey.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=serue@us.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox