From: Andrew Sayers <kernel.org@pileofstuff.org>
To: Salvatore Bonaccorso <carnil@debian.org>
Cc: "Antonio Russo" <aerusso@aerusso.net>,
"Guido Günther" <agx@sigxcpu.org>,
"Luiz Augusto von Dentz" <luiz.von.dentz@intel.com>,
linux-bluetooth@vger.kernel.org
Subject: Re: Do not start mpris-proxy for root user
Date: Sun, 18 May 2025 14:12:41 +0100 [thread overview]
Message-ID: <aCncrfc7qbtLEpta@andrews-2024-laptop.sayers> (raw)
In-Reply-To: <aCiLTy-IuqV6V7WA@eldamar.lan>
On Sat, May 17, 2025 at 03:12:47PM +0200, Salvatore Bonaccorso wrote:
> On Sun, Jan 26, 2025 at 08:04:27AM -0700, Antonio Russo wrote:
> > Hello,
> >
> > A default installation of bluez results in the systemd user unit
> > mpris-proxy.service being started for all users---including root.
> > This unnecessarily exposes root to any security vulnerability in
> > mpris-proxy.
> >
> > Please consider the following trivial patch that changes this
> > default behavior.
> >
> > Best,
> > Antonio Russo
> >
> >
> > From d9e02494e661109607c073968fa352c1397a1ffb Mon Sep 17 00:00:00 2001
> > From: Antonio Enrico Russo <aerusso@aerusso.net>
> > Date: Sun, 26 Jan 2025 08:00:26 -0700
> > Subject: [PATCH] Do not start mpris-proxy for root user
> >
> > A default installation of bluez results in the systemd user unit
> > mpris-proxy.service being started for all users---including root.
> > This unnecessarily exposes root to any security vulnerability in
> > mpris-proxy.
> >
> > Inhibit this default behavior by using ConditionUser=!root.
> >
> > Signed-off-by: Antonio Enrico Russo <aerusso@aerusso.net>
> > ---
> > tools/mpris-proxy.service.in | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/tools/mpris-proxy.service.in b/tools/mpris-proxy.service.in
> > index 5307490..118ed6e 100644
> > --- a/tools/mpris-proxy.service.in
> > +++ b/tools/mpris-proxy.service.in
> > @@ -4,6 +4,7 @@ Documentation=man:mpris-proxy(1)
> > Wants=dbus.socket
> > After=dbus.socket
> > +ConditionUser=!root
> > [Service]
> > Type=simple
> > --
> > 2.48.1
>
> Looping in all primary involved people for adding or touching the
> systemd unit file. Luiz, Guido and Andrew, any opinion on the proposed
> change?
It sounds like the same logic would apply to all system accounts.
Would "ConditionUser=!@system" make more sense? For details, see
https://www.freedesktop.org/software/systemd/man/latest/systemd.unit.html#ConditionUser=
>
> For reference as well discussed in downstream Debian in
> https://bugs.debian.org/1094257
>
> Regards,
> Salvatore
>
>
next prev parent reply other threads:[~2025-05-18 13:13 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-26 15:04 Do not start mpris-proxy for root user Antonio Russo
2025-05-17 13:12 ` Salvatore Bonaccorso
2025-05-17 14:06 ` Guido Günther
2025-05-18 13:12 ` Andrew Sayers [this message]
2025-05-31 8:20 ` Salvatore Bonaccorso
2025-05-31 18:17 ` Guido Günther
2025-06-02 0:29 ` Antonio Russo
2025-06-02 18:18 ` Luiz Augusto von Dentz
2025-06-03 3:37 ` [PATCH] Do not start mpris-proxy for system users Antonio Russo
2025-06-03 5:10 ` bluez.test.bot
2025-06-03 6:59 ` [PATCH] " Guido Günther
2025-06-03 7:16 ` Paul Menzel
2025-06-03 14:35 ` Andrew Sayers
2025-06-03 17:30 ` patchwork-bot+bluetooth
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=aCncrfc7qbtLEpta@andrews-2024-laptop.sayers \
--to=kernel.org@pileofstuff.org \
--cc=aerusso@aerusso.net \
--cc=agx@sigxcpu.org \
--cc=carnil@debian.org \
--cc=linux-bluetooth@vger.kernel.org \
--cc=luiz.von.dentz@intel.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