Commit graph

957 commits

Author SHA1 Message Date
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
Vincas Dargis
2d8d2f06d5 Move drirc.d access to dri-common abstraction
Commit b5be596460 added ability to read
/usr/share/drirc.d/ directory to mesa abstraction.

This seems to be a mistake, as it was noted that not all GUI
applications, that need access to drirc.d, also need whole mesa-related
rules (including writing caches).

Move /usr/share/drirc.d/ access to different abstraction. This is not a
breaking change, because any GUI application will have included X
abstraction already, and in the end result - dri-common abstraction too.
2019-01-27 17:40:04 +02:00
John Johansen
330bd6c5f6 abstractions: fix merge conflict resoltion typo
Fix typo introduced when resolving a merge conflict for d9ab83281b
("Add support for local additions to abstractions")

Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-01-24 04:34:03 -08:00
Matthew Garrett
d9ab83281b Add support for local additions to abstractions
Local policy may want to extend or override abstractions, so add support for including local updates to them.

Acked-by: Christian Boltz <apparmor@cboltz.de>
Acked-by: intrigeri <intrigeri@boum.org>
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-01-24 03:06:03 -08:00
Marius Tomaschewski
b0bacba9db abstractions/nameservice: allow /run/netconfig/resolv.conf
Latest netconfig in openSUSE writes /run/netconfig/resolv.conf, and only
has a symlink to it in /etc

References: https://bugzilla.opensuse.org/show_bug.cgi?id=1097370
Acked-by: Christian Boltz <apparmor@cboltz.de>
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-01-24 02:43:02 -08:00
Christian Boltz
0199edf8e7
update mysqld profile
This updates the mysqld to what I use on my servers nowadays.
2019-01-24 00:30:34 +01:00
Christian Boltz
5d384d9625 Merge branch 'cboltz-dnsmasq-libvirtd' into 'master'
dnsmasq: allow peer=libvirtd to support named profile

See merge request apparmor/apparmor!304

Acked-by: Eric Chiang <ericchiang@google.com> for 2.12..master
2019-01-22 22:23:59 +00:00
Vincas Dargis
b5be596460 mesa: allow reading drirc.d
Recent Mesa update introduces new denies:

```
type=AVC msg=audit(1547905564.212:523): apparmor="DENIED"
operation="open" profile="supertuxkart" name="/usr/share/drirc.d/"
pid=15740 comm="supertuxkart" requested_mask="r" denied_mask="r"
fsuid=1000 ouid=0
```

```
type=AVC msg=audit(1547905896.307:548): apparmor="DENIED"
operation="open" profile="supertuxkart"
name="/usr/share/drirc.d/00-mesa-defaults.conf" pid=15963 c
omm="supertuxkart" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
```

Add rule to allow reading newly required paths.
2019-01-19 15:55:58 +02:00
Christian Boltz
027dcdb23f Merge branch 'fix-compose-cache' into 'master'
qt5-compose-cache-write: fix anonymous shared memory access

See merge request apparmor/apparmor!301

Acked-by: Christian Boltz <apparmor@cboltz.de> for 2.10..master
2019-01-14 20:51:10 +00:00
Christian Boltz
3e3c90152f Merge branch 'fix-qt5-settings' into 'master'
qt5-settings-write: fix anonymous shared memory access

See merge request apparmor/apparmor!302

Acked-by: Christian Boltz <apparmor@cboltz.de> for 2.10..master
2019-01-14 20:48:21 +00:00
Vincas Dargis
8f6a8fb194 Refactor qt5-settings-write
Merge symlink rules together with `rw` rules for brevity.
2019-01-14 19:23:49 +02:00