Security and authentification with D-Bus

Matthew Johnson dbus at matthew.ath.cx
Mon Apr 26 09:31:55 PDT 2010


On Mon Apr 26 16:55, Yoann Sculo wrote:
> I'm working with D-Bus to let a bunch of application talk together. It  
> works great !
> However, I'm wondering how D-Bus could provide authentification for my  
> applications. Basically, I'd like to be sure a spy-application isn't  
> usurping another application's identity. This is quite important for me  
> in my context.

Can you give us any more details?

The problem you have is how this interacts with the Unix security model. D-Bus
currently authenticates the _user_ that an application runs as and not the
application itself. Indeed, you cannot connect to a session bus as any other
user.

We could do something more specific, but there wouldn't be any point. If you
are running as the same user as another process, then you can snoop it's memory
image to determine any key needed to authenticate as that process - or read it
from disk, or inject code into that process to send messages as that process or
whatever. Essentially, there is no security gain from that.

D-Bus does have SELinux support, so if you are using that to further control
access to the system you can use the same security contexts on D-Bus to assure
it is the correct application. Again though, if the malicious application is
in the same security context, you have already lost.

Matt

-- 
www.matthew.ath.cx
D-Bus Java
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: Digital signature
URL: <http://lists.freedesktop.org/archives/dbus/attachments/20100426/7bf83f65/attachment.pgp>


More information about the dbus mailing list