linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* kdbus:  credential faking
@ 2015-07-09 18:26 Stephen Smalley
  2015-07-09 22:22 ` David Herrmann
  0 siblings, 1 reply; 25+ messages in thread
From: Stephen Smalley @ 2015-07-09 18:26 UTC (permalink / raw)
  To: Greg KH, Daniel Mack, Djalal Harouni, lkml, LSM, Paul Osmialowski,
	Casey Schaufler, Paul Moore

Hi,

I have a concern with the support for faked credentials in kdbus, but
don't know enough about the original motivation or intended use case to
evaluate it concretely.  I raised this issue during the "kdbus for
4.1-rc1" thread a while back but none of the kdbus maintainers
responded, and the one D-BUS maintainer who did respond said that there
is no API in dbus-daemon for faking client credentials, so this is not
something inherited from dbus-daemon or required for compatibility with it.

First, I have doubts as to whether there should be any way to fake the
seclabel, no matter how "privileged" the caller.  Unless there is a
clear use case for that functionality, I would prefer to see it dropped
altogether.

Second, IIUC, the ability to fake any portion of the credentials or pids
is granted if the caller either has CAP_IPC_OWNER or owns the bus (uid
match).  Clearly that isn't sufficient basis for seclabel faking, and it
seems questionable as to whether it should be sufficient for faking any
of the other credentials or pids.  Compare with e.g.
net/core/scm.c:scm_check_creds() logic for faking credentials on a Unix
domain socket, which requires CAP_SYS_ADMIN for faking pid, CAP_SETUID
for faking any of the uid fields, and CAP_SETGID for faking any of the
gid fields.

Thanks for any light you can shed on the matter.

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

end of thread, other threads:[~2015-07-11 11:30 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-09 18:26 kdbus: credential faking Stephen Smalley
2015-07-09 22:22 ` David Herrmann
2015-07-09 22:56   ` Casey Schaufler
2015-07-10  9:05     ` David Herrmann
2015-07-10 13:29       ` Stephen Smalley
2015-07-10 13:25   ` Stephen Smalley
2015-07-10 13:43     ` David Herrmann
2015-07-10 14:20       ` Martin Steigerwald
2015-07-10 14:25         ` Martin Steigerwald
2015-07-10 14:47       ` Stephen Smalley
2015-07-10 14:57         ` Alex Elsayed
2015-07-10 16:20           ` Casey Schaufler
2015-07-10 16:30             ` Alex Elsayed
2015-07-10 17:46               ` Casey Schaufler
2015-07-10 16:48         ` David Herrmann
2015-07-10 18:13           ` Stephen Smalley
2015-07-10 22:04         ` Greg KH
2015-07-10 15:59       ` Casey Schaufler
2015-07-10 16:26         ` David Herrmann
2015-07-10 17:16           ` Casey Schaufler
2015-07-10 18:02             ` Richard Weinberger
2015-07-10 18:36               ` Casey Schaufler
2015-07-10 18:39                 ` Richard Weinberger
2015-07-11 11:30                 ` Richard Weinberger
2015-07-11 11:02       ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).