All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Return error on invalid pids for procattr funcs.
@ 2016-02-23 20:23 Daniel Cashman
  2016-02-23 20:23 ` [PATCH 1/2] libselinux: procattr: return error on invalid pid_t input Daniel Cashman
  0 siblings, 1 reply; 11+ messages in thread
From: Daniel Cashman @ 2016-02-23 20:23 UTC (permalink / raw)
  To: selinux; +Cc: nnk, jeffv, sds, dcashman

From: dcashman <dcashman@android.com>

The getprocattrcon functions currently do not do any validation of the supplied
pid argument.  This argument is nonsensical for negative pid values and is also
not specified for an input value of zero.  This is an error-prone convention and
should be changed.  This is evidenced by issues such as the following android
bug:

https://code.google.com/p/android/issues/detail?id=200617

dcashman (2):
  libselinux: procattr: return error on invalid pid_t input.
  libselinux: procattr: return einval for <= 0 pid args.

 libselinux/src/procattr.c | 21 +++++++++++++++++----
 1 file changed, 17 insertions(+), 4 deletions(-)

-- 
2.7.0.rc3.207.g0ac5344

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2016-02-29 17:38 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

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.