Commit graph

917 commits

Author SHA1 Message Date
intrigeri
852c1e766d gnome abstraction: allow reading per-user themes from $XDG_DATA_HOME
Bug-Debian: https://bugs.debian.org/930031

As per https://developer.gnome.org/gtk3/stable/ch32s03.html,
since GTK+ 3.6, $XDG_DATA_HOME/themes is preferred over $HOME/.themes.
We already support the latter, let's also support the former.
2019-12-11 06:31:37 +00:00
Christian Boltz
1cfd4d4bbc Merge branch 'cboltz-usr-etc' into 'master'
Allow /usr/etc/ in abstractions/authentication

openSUSE (and hopefully some other distributions) work on moving shipped
config files from /etc/ to /usr/etc/ so that /etc/ only contains files
written by the admin of each system.

See https://en.opensuse.org/openSUSE:Packaging_UsrEtc for details and
the first moved files.

Updating abstractions/authentication is the first step, and also fixes
bugzilla.opensuse.org/show_bug.cgi?id=1153162

See merge request apparmor/apparmor!426

Acked-by: John Johansen <john.johansen@canonical.com> for 2.12..master
2019-11-27 19:40:47 +00:00
John Johansen
a10fa57fb6 Add dbus-network-manager-strict abstraction
Some applications queries network configuration (using QNetworkConfigurationManager class in Qt and similar), and that produces DBus denials under AppArmor confinement when NetworkManager backend is used.

Add abstraction that allows most common read-only DBus queries for getting current network configuration from NetworkManager backend.


PR: https://gitlab.com/apparmor/apparmor/merge_requests/409
Acked-by: John Johansen <john.johansen@canonical.com>
2019-11-27 18:01:42 +00:00
John Johansen
48fdd0ef76 Remove a selection of obsolete support
Requires NPAPI which no major browsers support anymore: Mozplugger npviewer / nspluginwrapper

The following have been discontinued Google Talk (and plugin) f-spot conkeror galeon Mozilla Prism rekonq Adobe Reader for Linux

Other gnome-codec-install is not in Ubuntu anymore gstreamer0.10 was replaced by 1.0

PR: https://gitlab.com/apparmor/apparmor/merge_requests/417
Acked-by: John Johansen <john.johansen@canonical.com>
2019-11-27 06:14:05 +00:00
Christian Boltz
663546c284 Merge branch 'cboltz-abstractions-kerberos' into 'master'
abstractions/kerberosclient: allow reading /etc/krb5.conf.d/

See merge request apparmor/apparmor!425

Acked-by: Steve Beattie <steve@nxnw.org> for 2.10..master
Acked-by: John Johansen <john.johansen@canonical.com> for 2.10..master
2019-11-18 21:35:29 +00:00
Christian Boltz
ee7194a714
Allow /usr/etc/ in abstractions/authentication
openSUSE (and hopefully some other distributions) work on moving shipped
config files from /etc/ to /usr/etc/ so that /etc/ only contains files
written by the admin of each system.

See https://en.opensuse.org/openSUSE:Packaging_UsrEtc for details and
the first moved files.

Updating abstractions/authentication is the first step, and also fixes
bugzilla.opensuse.org/show_bug.cgi?id=1153162
2019-10-07 21:47:25 +02:00
Christian Boltz
5066dc6195 Merge branch 'profile-usr.sbin.winbindd' into 'master'
Update usr.sbin.winbindd profile

Winbind requires access to `/var/cache/samba/msg.lock/*`.

On Arch Linux Winbind's pid is set to `/run/winbindd.pid` ( https://git.archlinux.org/svntogit/packages.git/tree/trunk/winbindd.service?h=packages/samba ).

See merge request apparmor/apparmor!411

Acked-by: John Johansen <john.johansen@canonical.com>
Acked-by: Christian Boltz <apparmor@cboltz.de>
2019-10-03 17:53:21 +00:00
Christian Boltz
dffed83161
abstractions/kerberosclient: allow reading /etc/krb5.conf.d/
Permit the use of /etc/krb5.conf.d configuration snippets

Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>

Originally submitted as https://build.opensuse.org/request/show/733763
2019-09-28 17:25:39 +02:00
John Johansen
094f9727fa Merge branch 'dont-allow-fontconfig-cache-write' into 'master'
abstractions/fonts: don't allow write of fontconfig cache files

See merge request apparmor/apparmor!420
2019-09-20 09:42:53 +00:00
Jamie Strandboge
c5968c70d0 abstractions/fonts: don't allow write of fontconfig cache files
879531b36ec3dfc7f9b72475c68c30e4f4b7b6af changed access for
@{HOME}/.{,cache/}fontconfig/** to include 'w'rite. Fontconfig has been
a source of CVEs. Confined applications should absolutely have read
access, but write access could lead to breaking out of the sandbox if a
confined application can write a malformed font cache file since
unconfined applications could then pick them up and be controlled via
the malformed cache. The breakout is dependent on the fontconfig
vulnerability, but this is the sort of thing AppArmor is meant to help
guard against.
2019-09-09 15:52:40 -05:00
intrigeri
c006f79141 abstractions/X: allow reading the Xauth file mutter passes to Xwayland.
Bug-Debian: https://bugs.debian.org/935058

Applications running under Xwayland in a GNOME+Wayland session need read access
to this file since:

  a8984a81c2

… that was first included in mutter 3.33.3.

This rule is presumably only needed for GNOME+Wayland sessions, so one could
argue that it should live in abstractions/wayland instead, but Jamie argued that
it should be in the X abstraction because Xwayland is a X server.
2019-09-08 07:41:36 +00:00
Bryan Quigley
0401235949 Remove a selection of obsolete support.
Requires NPAPI which no major browsers support anymore:
Mozplugger
npviewer / nspluginwrapper

The following have been discontinued
Google Talk (and plugin)
f-spot
conkeror
galeon
Mozilla Prism
rekonq
Adobe Reader for Linux

Other
gnome-codec-install is not in Ubuntu anymore
gstreamer0.10 was replaced by 1.0
2019-08-24 09:50:34 -07:00
Jörg Sommer
cd3532f792 profiles/gnome: Allow access of /run/mount/utab
When a filesystem is mounted with the option *user*, the file selection
dialogue, e.g. in *Evince*, triggers an access of */run/mount/utab*, which
comes from *libmount* and should be allowed.
2019-08-09 10:11:37 +02:00
nl6720
54dc60ff5b Update usr.sbin.winbindd profile
Winbind requires access to /var/cache/samba/msg.lock/*.
Move msg.lock/ to abstractions/samba.
On Arch Linux Winbind's pid is set to /run/winbindd.pid.

Signed-off-by: nl6720 <nl6720@gmail.com>
2019-08-08 19:37:37 +03:00
Vincas Dargis
6cfeb55e0e Add dbus-network-manager-strict abstraction
Some applications queries network configuration (using
QNetworkConfigurationManager class in Qt and similar), and that produces
DBus denials under AppArmor confinement when NetworkManager backend is
used.

Add abstraction that allows most common read-only DBus queries for
getting current network configuration from NetworkManager backend.
2019-08-05 16:23:58 +03:00
Christian Boltz
2d74c42c75
Fix whitespace in ssl_* abstractions
Drop superfluous whitespace introduced by
4d275bab69 and
3016ffb336
2019-06-29 23:23:07 +02:00
Richard Chen
4d275bab69 Update ssl_keys 2019-06-28 07:31:10 +00:00
Richard Chen
3016ffb336 Add for CertBot on openSUSE Leap 2019-06-28 07:30:10 +00:00
Christian Boltz
f250e94240
postfix/master needs to execute postfix/error 2019-06-20 14:37:46 +02:00
Christian Boltz
ff287e9238 abstractions/dri-common: allow reading /dev/dri/
Fixes https://gitlab.com/apparmor/apparmor/issues/29

PR: https://gitlab.com/apparmor/apparmor/merge_requests/382
Signed-off-by: Christian Boltz <apparmor@cboltz.de>
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-06-14 01:10:38 -07:00
Christian Boltz
c866bc276b update freshclam profile
freshclam needs to write more files in /var/lib/clamav/, and also needs
to write its pid file.

PR: https://gitlab.com/apparmor/apparmor/merge_requests/381
Signed-off-by: Christian Boltz <apparmor@cboltz.de>
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-06-14 01:05:16 -07:00
John Johansen
48e9f0ee2e Merge branch 'cboltz-postfix-profiles' into 'master'
update postfix profiles

On openSUSE Leap 15.1, the postfix binaries live in /usr/lib/postfix/bin/ which was not covered in the postfix.\* attachment and mrix rules.

Also add several permissions to the postfix.\* profiles needed on openSUSE Leap 15.1.

PR: https://gitlab.com/apparmor/apparmor/merge_requests/380
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-06-14 04:31:14 +00:00
Christian Boltz
7016ac954b
Add several permissions to the postfix.* profiles
... needed on openSUSE Leap 15.1
2019-06-02 18:39:43 +02:00
Christian Boltz
f668f31bf0
adjust postfix profiles for openSUSE path
On openSUSE Leap 15.1, the postfix binaries live in
/usr/lib/postfix/bin/ which was not covered in the postfix.* attachment
and mrix rules.
2019-06-02 18:39:43 +02:00
Christian Boltz
234a924480
syslog-ng: add abstractions/python for python-parser
When running syslog-ng with a defined python-parser, it needs access to
python libraries.

For details about python-parser, see
https://www.syslog-ng.com/community/b/blog/posts/format-your-log-messages-in-python

References: https://github.com/balabit/syslog-ng/issues/2625
2019-04-05 19:16:46 +02:00
John Johansen
2b091491b0 Merge branch 'identd' into 'master'
identd: Add network netlink dgram

identd requires access to network netlink dgram.

PR: https://gitlab.com/apparmor/apparmor/merge_requests/353
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-03-29 08:04:40 +00:00
John Johansen
9ba051c6ed Merge branch 'base-abstraction-allow-all-libraries' into 'master'
base abstraction: allow mr on *.so* in common library paths.

For example, VirtualBox guests have /usr/lib/VBoxOGL.so.

Without this changes, in a VirtualBox VM with VBoxVGA graphics,
at least one Qt5 application (OnionShare) won't start and display:

  ImportError: libGL.so.1: failed to map segment from shared object

… and the system logs have:

  apparmor="DENIED" operation="file_mmap" profile="/usr/bin/onionshare-gui" name="/usr/lib/VBoxOGL.so" pid=11415 comm="onionshare-gui" requested_mask="m" denied_mask="m" fsuid=1000 ouid=0

While this works fine with VBoxSVGA and VMSVGA when 3D acceleration is enabled.

So let's not assume all libraries have a name that starts with "lib".

Bug-Tails: https://redmine.tails.boum.org/code/issues/16414

Candidate for master and 2.13.

PR: https://gitlab.com/apparmor/apparmor/merge_requests/345
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-03-24 07:04:14 +00:00
intrigeri
5cbb7df95e base abstraction: allow mr on *.so* in common library paths.
For example, VirtualBox guests have /usr/lib/VBoxOGL.so.

Without this changes, in a VirtualBox VM with VBoxVGA graphics,
at least one Qt5 application (OnionShare) won't start and display:

  ImportError: libGL.so.1: failed to map segment from shared object

… and the system logs have:

  apparmor="DENIED" operation="file_mmap" profile="/usr/bin/onionshare-gui" name="/usr/lib/VBoxOGL.so" pid=11415 comm="onionshare-gui" requested_mask="m" denied_mask="m" fsuid=1000 ouid=0

While this works fine with VBoxSVGA and VMSVGA when 3D acceleration is enabled.

So let's not assume all libraries have a name that starts with "lib".
2019-03-24 06:06:42 +00:00
Simon Deziel
f01fd38ca0 dovecot: master SIGTERM child that are slow to die
Signed-off-by: Simon Deziel <simon@sdeziel.info>
2019-03-22 18:33:14 -04:00
Goldwyn Rodrigues
1d75abba3f identd: Add network netlink dgram
identd requires access to network netlink dgram.
2019-03-18 11:15:49 -05:00
John Johansen
a122764ddf dovecot: align {pop3,managesieve}-login to imap-login
Those 3 login daemons should have similiar needs and thus similar profiles. IMAP is likely the most tested one so let's align the other 2 with it. Unix and TCP sockets rules were added to pop3-login after the removal of abstractions/nameservice that included them implicitly.

PR: https://gitlab.com/apparmor/apparmor/merge_requests/338
Signed-off-by: Simon Deziel [simon@sdeziel.info](mailto:simon@sdeziel.info)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-03-11 22:58:55 +00:00
Cameron Nemo
6d81563267 abstractions/qt5: read user configuration
Signed-off-by: Cameron Nemo <camerontnorman@gmail.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-03-11 15:50:45 -07:00
Christian Boltz
175a78c55a Merge branch 'profile-updates' into 'master'
profiles/gnome: add @{HOME}/.cache/gtk-3.0

Found this path is used by gtk_compose_hash_get_cache_path() in
gtkcomposetable.c.

See merge request apparmor/apparmor!342

Acked-by: Jamie Strandboge <jamie@canonical.com>
Acked-by: Christian Boltz <apparmor@cboltz.de>
2019-03-07 18:59:22 +00:00
intrigeri
cdeb618518 tunables/share: fix buggy syntax that broke the ~/.local/share part of the @{user_share_dirs} tunable
Fixes regression introduced in a91d199ab1.

Bug: https://bugs.launchpad.net/apparmor/+bug/1816470
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=920833, https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=921888
2019-02-24 15:20:17 +00:00
Jörg Sommer
6da7ed2a78 profiles/gnome: add @{HOME}/.cache/gtk-3.0
Found this path is used by gtk_compose_hash_get_cache_path() in
gtkcomposetable.c.
2019-02-20 00:35:06 +01:00
Simon Deziel
e3fd962e36 dovecot: restrict access by owner to the dovecot/config socket
Being able to read the config means accessing ssl_key data so
should only be restricted to root https://wiki.dovecot.org/Services#config

Signed-off-by: Simon Deziel <simon@sdeziel.info>
2019-02-18 09:53:39 -05:00
Simon Deziel
bc36daa264 dovecot: align {pop3,managesieve}-login to imap-login
Those 3 login daemons should have similiar needs and thus similar
profiles. IMAP is likely the most tested one so let's align the
other 2 with it. Unix and TCP sockets rules were added to pop3-login
after the removal of abstractions/nameservice that included them
implicitly.

Signed-off-by: Simon Deziel <simon@sdeziel.info>
2019-02-17 17:33:24 -05:00
Christian Boltz
5e5b02b722 Merge branch 'dovecot-ssl' into 'master'
dovecot: remove SSL access to {imap,managesieve,pop3}-login

See merge request apparmor/apparmor!337

Acked-by: Christian Boltz <apparmor@cboltz.de> (master only)
2019-02-17 21:07:44 +00:00
Simon Deziel
f509fa1675 dovecot: add OpenSSL access to {imap,managesieve,pop3}-login
Based on feedback from Christian Boltz

Signed-off-by: Simon Deziel <simon@sdeziel.info>
2019-02-17 15:55:32 -05:00
Simon Deziel
702411170d dovecot: remove SSL access to {imap,managesieve,pop3}-login
The certificates and keys are read by dovecot and
dovecot/config only.

Signed-off-by: Simon Deziel <simon@sdeziel.info>
2019-02-17 15:43:58 -05:00
Simon Deziel
6a7c49b149 dovecot: add abstractions/ssl_certs to lmtp
It already has abstractions/ssl_keys

Signed-off-by: Simon Deziel <simon@sdeziel.info>
2019-02-14 21:01:23 -05:00
Simon Deziel
17db8f3884 dovecot: auth processes need to read from postfix auth socket
They also need rw on the auth-userdb socket

Signed-off-by: Simon Deziel <simon@sdeziel.info>
2019-02-13 22:50:14 -05:00
Simon Deziel
9afeb22548 dovecot: let dovecot/anvil rw the auth-penalty socket
Signed-off-by: Simon Deziel <simon@sdeziel.info>
2019-02-13 22:33:44 -05:00
Simon Deziel
d0aa863f6b dovecot: allow chroot'ing the auth processes
When using passdb/userdb not requiring root (!= /etc/shadow access)
it is recommended to run the auth processes as non root and chroot'ed

Signed-off-by: Simon Deziel <simon@sdeziel.info>
2019-02-13 22:27:08 -05:00
Simon Deziel
a57f01d86b dovecot: allow FD passing between dovecot and dovecot's anvil 2019-02-10 21:36:10 -05:00
Vincas Dargis
e322c02c37 vulkan: allow reading /etc/vulkan/icd.d/
Recent Vulkan upgrades introduces new denies:

```
type=AVC msg=audit(1549749243.284:4250): apparmor="DENIED"
operation="open" profile="/usr/bin/vkcube" name="/etc/vulkan/icd.d/"
pid=16472 comm="vkcube" requested_mask="r" denied_mask="r" fsuid=1000
ouid=0
```

```
type=AVC msg=audit(1549800398.470:2612): apparmor="DENIED"
operation="open" profile="/usr/bin/vkcube"
name="/etc/vulkan/icd.d/test.j
son" pid=12230 comm="vkcube" requested_mask="r" denied_mask="r"
fsuid=1000 ouid=0
```

Update `vulkan` abstraction to allow reading new configuration directory.
2019-02-10 14:07:17 +02:00
Vincas Dargis
0f30a59021 kde: fix global settings access for Kubuntu and openSUSE
On Kubuntu, these denies are being produced:
```
type=AVC msg=audit(1549301888.419:91): apparmor="DENIED" operation="open"
profile="qtox"
name="/usr/share/kubuntu-default-settings/kf5-settings/kdeglobals" pid=1603
comm="qtox" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0

type=AVC msg=audit(1549301964.008:126): apparmor="DENIED" operation="open"
profile="qtox" name="/usr/share/kubuntu-default-settings/kf5-settings/breezerc"
pid=1822 comm="qtox" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0

type=AVC msg=audit(1549302031.194:155): apparmor="DENIED" operation="open"
profile="qtox"
name="/usr/share/kubuntu-default-settings/kf5-settings/baloofilerc" pid=1899
comm="qtox" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
```

Meanwhile, on openSUSE:
```
type=AVC msg=audit(1549302286.921:205): apparmor="DENIED" operation="open" profile="qtox" name="/etc/xdg/kdeglobals" pid=12781 comm="qtox" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
```

Add read only rules for allowing access to global KDE settings.
2019-02-05 18:46:39 +02:00
intrigeri
16c4713363 audio abstraction: grant read access to the libao configuration files.
Bug-Debian: https://bugs.debian.org/920670

Relevant documentation: https://xiph.org/ao/doc/config.html
2019-01-31 09:29:24 +00:00
intrigeri
2d72795f65 audio abstraction: grant read access to the system-wide asound.conf.
Bug-Debian: https://bugs.debian.org/920669

Relevant documentation: http://www.alsa-project.org/main/index.php/Asoundrc

We already grant read access to the corresponding per-user configuration file
(~/.asoundrc) so it makes sense to also grant access to the system-wide one.
2019-01-31 09:27:10 +00:00
Christian Boltz
85c01a56e6
add test to ensure abstractions have '#include if exists <*.d>'
Exceptions are
- ubuntu-browsers (because we already have ubuntu-browsers.d with
  different usage)
- ubuntu-helpers (which includes the sanitized_helper subprofile, so
  adding something in the global area wouldn't make much sense)

Also adjust abstractions/postfix-common to use the style all
abstractions use.
2019-01-27 20:41:28 +01:00