From: Stephen Smalley <sds@tycho.nsa.gov>
To: Nick Kralevich <nnk@google.com>, Daniel Cashman <dcashman@android.com>
Cc: SELinux <selinux@tycho.nsa.gov>, Jeffrey Vander Stoep <jeffv@google.com>
Subject: Re: [PATCH 2/2] libselinux: procattr: return einval for <= 0 pid args.
Date: Mon, 29 Feb 2016 12:38:04 -0500 [thread overview]
Message-ID: <56D481FC.9010009@tycho.nsa.gov> (raw)
In-Reply-To: <CAFJ0LnH=zQuJ6mSBSQu4XBjQ-jHnOpKveh7TwE55WLxfj5KGXQ@mail.gmail.com>
On 02/23/2016 04:22 PM, Nick Kralevich wrote:
> Thanks for proposing this patch Dan.
>
> As you said, the current API feels error prone, as it has two entirely
> different behaviors depending on whether the pid is zero or non-zero.
> Your patch corrects this error prone API and clearly separates out a
> query by PID vs a query of the process itself.
>
> This patch helps provide robustness against bugs similar to:
>
> https://code.google.com/p/google-security-research/issues/detail?id=727
> https://code.google.com/p/android/issues/detail?id=200617
>
> (note that the Android code in question was reviewed by Stephen,
> myself, and others within Google, and we all missed this particular
> bug)
>
> I would recommend the upstream SELinux community accept the patch,
> even at the potential expense of breaking compatibility with other
> apps.
As I haven't heard or seen of anything that would break with this
change, I've merged this patch. You'll need to apply it separately to
Android libselinux since that is still a fork.
next prev parent reply other threads:[~2016-02-29 17:38 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-23 20:23 [PATCH 0/2] Return error on invalid pids for procattr funcs Daniel Cashman
2016-02-23 20:23 ` [PATCH 1/2] libselinux: procattr: return error on invalid pid_t input Daniel Cashman
2016-02-23 20:24 ` [PATCH 2/2] libselinux: procattr: return einval for <= 0 pid args Daniel Cashman
2016-02-23 20:29 ` Daniel Cashman
2016-02-23 21:22 ` Nick Kralevich
2016-02-29 17:38 ` Stephen Smalley [this message]
2016-02-24 14:49 ` getpidcon with pid == 0 (Was: Re: [PATCH 2/2] libselinux: procattr: return einval for <= 0 pid args.) Stephen Smalley
2016-02-24 15:25 ` Nick Kralevich
2016-02-24 15:32 ` Stephen Smalley
2016-02-24 16:47 ` Petr Lautrbach
2016-02-24 14:21 ` [PATCH 1/2] libselinux: procattr: return error on invalid pid_t input Stephen Smalley
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=56D481FC.9010009@tycho.nsa.gov \
--to=sds@tycho.nsa.gov \
--cc=dcashman@android.com \
--cc=jeffv@google.com \
--cc=nnk@google.com \
--cc=selinux@tycho.nsa.gov \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.