2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-08-28 12:58:07 +00:00

4838 Commits

Author SHA1 Message Date
Christian Boltz
87f91864be
handle_children: Fix denying of adding a hat
Choosing "Deny" when handle_children() asks about adding a hat should
not add that hat, but it should _not_ leave the function because that
means all the other log events that were not migrated to prelog yet will
be lost.

Change "return" to "continue" to fix this.
2019-05-02 22:42:03 +02:00
Christian Boltz
21c3d57f8d Merge branch 'cboltz-link-man' into 'master'
Drop 'to' option for link rules from manpage

See merge request apparmor/apparmor!368

Acked-by: Eric Chiang <ericchiang@google.com>

(cherry picked from commit 041cd95a98e798e3567c63c3c7eb74d81fc5c64e)

115a1d89 Drop 'to' option for link rules from manpage
2019-04-29 19:22:13 +00:00
Christian Boltz
388e5be974 Merge branch 'cboltz-gitignore' into 'master'
Add several libapparmor/swig/ruby files to gitignore

See merge request apparmor/apparmor!366

(cherry picked from commit 9c11ce37c61b442161c5b13dd28d7939bc1327fa)

7ed1a16a Add several libapparmor/swig/ruby files to gitignore
2019-04-26 16:16:21 +00:00
Christian Boltz
9aaff3ce13 Merge branch 'bugfix/aa-always-logfile-fallback' into 'master'
Fix error 'KeyError: 'logfiles'' when no logprof.conf exists

See merge request apparmor/apparmor!365

Acked-by: Christian Boltz <apparmor@cboltz.de> for 2.12..master

(cherry picked from commit cece7871829ed85a3ed3783be3ac009ad0cfe205)

455c4413 aa.py: Ensure there is always a fallback falue for the logfile location
3c7e1668 aa.py: Indicate permission error if log file is found but cannot be opened
2019-04-21 16:48:47 +00:00
Goldwyn Rodrigues
82094950e2 identd: Add network netlink dgram
identd requires access to network netlink dgram.

(cherry picked from commit 1d75abba3f3ecc5a7df7bc25e8290e6697e76094)
PR: https://gitlab.com/apparmor/apparmor/merge_requests/353
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-03-29 01:06:41 -07:00
intrigeri
08f9d16d37 Adjust tests to match base abstraction update.
Since !345 the set of permissions that are granted (get_file_perms_2)
or suggested (propose_file_rules) has changed. These new sets are
expected due to the changes brought by this MR, so let's adjust
the test suite accordingly.

(cherry picked from commit 0170e98f9c7342a614bbda5ce9e64a1444f47413)
PR: https://gitlab.com/apparmor/apparmor/merge_requests/358
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-03-29 00:58:11 -07:00
intrigeri
8dff7dc232 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".

PR: https://gitlab.com/apparmor/apparmor/merge_requests/345
(cherry picked from commit 5cbb7df95ef241725b327bccfb5aa21f8be14695)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-03-24 00:06:25 -07:00
Simon Deziel
b4f55efcc9 dovecot: master SIGTERM child that are slow to die
When doing a service reload, I noticed the following:

    ```Mar 22 15:52:27 smtp dovecot: master: Warning: SIGHUP received - reloading configuration
    Mar 22 15:52:27 smtp dovecot: imap(simon): Server shutting down. in=35309 out=232805
    Mar 22 15:52:27 smtp dovecot: imap(simon): Server shutting down. in=24600 out=1688166
    Mar 22 15:52:27 smtp dovecot: imap(simon): Server shutting down. in=14026 out=95516
    Mar 22 15:52:27 smtp dovecot: imap(simon): Server shutting down. in=13776 out=141513
    Mar 22 15:52:33 smtp dovecot: master: Warning: Processes aren't dying after reload, sending SIGTERM.
    Mar 22 15:52:33 smtp dovecot: master: Error: service(imap): kill(5806, 15) failed: Permission denied
    Mar 22 15:52:33 smtp dovecot: master: Error: service(imap-login): kill(5804, 15) failed: Permission denied
    Mar 22 15:52:33 smtp dovecot: master: Error: service(config): kill(506, 15) failed: Permission denied
    Mar 22 15:52:33 smtp kernel: [65542.184326] audit: type=1400 audit(1553284353.609:82): apparmor="DENIED" operation="signal" profile="dovecot" pid=414 comm="dovecot" requested_mask="send" denied_mask="send" signal=term peer="/usr/lib/dovecot/imap"
    Mar 22 15:52:33 smtp kernel: [65542.197596] audit: type=1400 audit(1553284353.625:83): apparmor="DENIED" operation="signal" profile="dovecot" pid=414 comm="dovecot" requested_mask="send" denied_mask="send" signal=term peer="/usr/lib/dovecot/imap-login"
    Mar 22 15:52:33 smtp kernel: [65542.197635] audit: type=1400 audit(1553284353.625:84): apparmor="DENIED" operation="signal" profile="dovecot" pid=414 comm="dovecot" requested_mask="send" denied_mask="send" signal=term peer="/usr/lib/dovecot/config"
    Mar 22 15:52:36 smtp dovecot: imap(simon): Server shutting down. in=17882 out=104004
    ```

The server was heavily loaded which is probably why it ended up trying to SIGTERM those.

Signed-off-by: Simon Deziel <simon@sdeziel.info>
(cherry picked from commit f01fd38ca0a13fd08e2c619eda303643e26ceca2)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-03-22 16:04:52 -07:00
Christian Boltz
d4f1f9310b Merge branch 'cboltz-subshell' into 'master'
remove_profiles(): Fix returning $retval

See merge request apparmor/apparmor!352

Acked-by: Eric Chiang <ericchiang@google.com> for 2.11..master

(cherry picked from commit c9148a304c1241066bf089c555db169cb8feec43)

be02f008 remove_profiles(): Fix returning $retval
2019-03-18 17:46:22 +00:00
Christian Boltz
75236d62e2 Merge branch 'cboltz-utils-keywords' into 'master'
update network keyword list in utils and add test

See merge request apparmor/apparmor!350

Acked-by: Eric Chiang <ericchiang@google.com> for 2.12..master

(cherry picked from commit dc010bc0340fe8b7159db5c3c2e01f7e27749ea8)

49849ed7 update network keyword list in utils and add test
2019-03-18 16:02:42 +00:00
Christian Boltz
e6a25f6971 Merge branch 'cboltz-network-keywords' into 'master'
apparmor.d manpage: update list of network domain keywords

See merge request apparmor/apparmor!349

Acked-by: Eric Chiang <ericchiang@google.com> for 2.12..master

(cherry picked from commit 6416ccebf636308eeb05185bb4ccdc1731a96980)

6b276563 apparmor.d manpage: update list of network domain keywords
2019-03-14 21:20:14 +00:00
Tyler Hicks
b502110dcf libapparmor: Fix variable name overlap in merge() macro
The calling function and the merge() macro both make use of a variable
named "i" but this causes problems when merging. The aa_policy_cache.sh
test script experiences "bad file descriptor" failures due to the merged
list containing invalid fd values (-1).

Fix this by renaming merge()'s index variables from i and j to y and z
to hopefully prevent future overlap. The better fix here would be to
convert merge() to a function but that's a more intrusive change and I
don't have an easy way to test the overlay feature.

PR: https://gitlab.com/apparmor/apparmor/merge_requests/348
(cherry picked from commit d7ac07afc48bdc61892e4227949ee8e24c95ff1e)
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-03-12 23:22:26 -07:00
Tyler Hicks
01aec04bd6 libapparmor: Fix segfault when loading policy cache files
qsort()'s _size_ parameter is used to indicate the size of the elements
in the _base_ array parameter. Adjust the third argument to qsort() to
indicate that we're dealing with an array of struct dirent pointers
rather than an array of struct dirent.

PR: https://gitlab.com/apparmor/apparmor/merge_requests/348
(cherry picked from commit 8b218718204062efa2dd093d95d2b05e0d722f92)
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-03-12 23:21:41 -07:00
Tyler Hicks
68eb3be2ae tests: Teach aa_policy_cache.sh about the cache location and subdirs
Adjust aa_policy_cache.sh to handle the additional layer in the
directory hierarchy when determining where the policy cache binaries are
stored. This is needed due to the multicache changes that allow multiple
policy caches to exist on a single system.

Differentiate between the cache location (the top level directory
containing all caches) and the cache directory (the directory used to
store the cached policies).

Use the libapparmor wrapper to get the cache directory for the given
cache location and the features of the currently running kernel.

PR: https://gitlab.com/apparmor/apparmor/merge_requests/348
(cherry picked from commit f31457b26e3f7a0433ce32c8f25bf270ab587f1c)
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-03-12 23:20:48 -07:00
Tyler Hicks
9374f419a0 tests: Add option to dump policy cache dir with the libapparmor wrapper
Print the policy cache directory path for the features of the currently
running kernel to stdout so that the aa_policy_cache.sh regression test
script can make use of it when writing out binary policy files.

PR: https://gitlab.com/apparmor/apparmor/merge_requests/348
(cherry picked from commit ad81ea0e671f3d4af1d6e44da6d41db3af3c1985)
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-03-12 23:20:24 -07:00
John Johansen
5704fba8d9 library: fix segfault in overlaydirat_for_each
(cherry picked from commit abbca9435f4ca427f73176e2dd2500819e491662)
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Tyler Hicks <tyler.hicks@canonical.com>
2019-03-12 16:19:59 -07:00
Eric Chiang
a75ae4497c parser: determine xmatch priority based on smallest DFA match
The length of a xmatch is used to prioritize multiple profiles that
match the same path, with the intent that the more specific match wins.
Currently, the length of a xmatch is computed by the position of the
first regex character.

While trying to work around issues with no_new_privs by combining
profiles, we noticed that the xmatch length computation doesn't work as
expected for multiple regexs. Consider the following two profiles:

    profile all /** { }
    profile bins /{,usr/,usr/local/}bin/** { }

xmatch_len is currently computed as "1" for both profiles, even though
"bins" is clearly more specific.

When determining the length of a regex, compute the smallest possible
match and use that for xmatch priority instead of the position of the
first regex character.

(cherry picked from commit cc09794fbdd3fe311027ae2ceb9f441a30a6075a)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-03-12 04:28:53 -07:00
John Johansen
4454ed77fd policy: Revert /usr/{bin,sbin}/ alternation in dnsmasq profile name
Using /usr/{bin,sbin}/dbsmasq as both the profile name and attachment break compatibility with the peer=/usr/sbin/dnsmasq rule, in the libvirtd profile.

Instead specify the profile has the old name of /usr/sbin/dnsmasq and specify the attachment separately. This looks funny but it avoids breaking libvirtd and still provides the broader attachment need by distros that have merged sbin into bin.

References: https://bugzilla.opensuse.org/show_bug.cgi?id=1127073

I propose this patch for 2.12 and 2.13. (Older versions didn't get the alternation, master has a profile name added.)

PR: https://gitlab.com/apparmor/apparmor/merge_requests/346
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-03-07 23:35:54 +00:00
Christian Boltz
0afd232e5b
dnsmasq: Work around breakage caused by {bin,sbin} alternation
Even if we expected it to stay compatible with peer=/usr/sbin/dnsmasq in
the libvirtd profile, practise shows that we were wrong.

This patch adds a tricky workaround so that the profile name doesn't
change, but the profile will attach even on distributions with merged
bin and sbin. (Credits for this crazy idea go to John ;-)

It also re-adds the libvirtd peer name /usr/sbin/libvirtd to avoid
breaking libvirtd.

References: https://bugzilla.opensuse.org/show_bug.cgi?id=1127073
and the discussion in https://gitlab.com/apparmor/apparmor/merge_requests/346
2019-03-07 21:55:47 +01:00
intrigeri
a7dab42516 Merge branch 'bug1816470' into 'master'
tunables/share: fix buggy syntax that broke the ~/.local/share part of the @{user_share_dirs} tunable

See merge request apparmor/apparmor!344

(cherry picked from commit 2ed3763a2f5f59605f75536b413b281ca7cf7297)

cdeb6185 tunables/share: fix buggy syntax that broke the ~/.local/share part of the...
2019-02-25 06:49:40 +00:00
John Johansen
394d086e58 parser: Fix parser failing to handle errors when setting up work
The parser is not correctly handling some error conditions when
dealing with work units. Failure to spawn work, access files, etc
should be returned where appropriate, and be able to abort processing
if abort_on_error is set.

In addition some errors are leading to a direct exit without checking
for abort_on_error.

BugLink: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=921866
BugLink: http://bugs.launchpad.net/bugs/1815294

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Eric Chiang <ericchiang@google.com>
(backported from commit cb43e57d27962039c5bc2a380936c7316575701f)

Conflicts:
	parser/parser_main.c
Reason:
	commit 48a32b78b189cf9e2c4d8bce8fb45c68bf4cc327 not backported
2019-02-22 02:35:22 -08:00
Christian Boltz
28c4dcccc3 Merge branch 'dovecot-fixes-no-doveadm' into 'master'
misc dovecot fixes (take #2)

See merge request apparmor/apparmor!336

Acked-by: Christian Boltz <apparmor@cboltz.de> for master..2.10

(cherry picked from commit e68beb988adf63c85b2091880c64a5e6ca3c20ca)

a57f01d8 dovecot: allow FD passing between dovecot and dovecot's anvil
d0aa863f dovecot: allow chroot'ing the auth processes
9afeb225 dovecot: let dovecot/anvil rw the auth-penalty socket
17db8f38 dovecot: auth processes need to read from postfix auth socket
6a7c49b1 dovecot: add abstractions/ssl_certs to lmtp
2019-02-17 21:04:38 +00:00
Steve Beattie
f75ec6fef6
usr merge fixups
Debian and Ubuntu have releases coming out with usr-merge in place. For
these systems, /bin and /sbin are symlinks to their respective /usr
directories. This breaks a few tests in the python utils and in the
regression tests. This patch series fixes them, mostly by performing
realpath() calls when necessary. For the ptrace regression test,
it copies the called /bin/true binary into the created temporary
directory and executes it from there. (Good for other reasons, too.)

(cherry picked from commit b4ab8476e4721b922d2de193b9203bba0c192bf9)
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
Acked-by: John Johansen <john.johansen@canonical.com>
MR: https://gitlab.com/apparmor/apparmor/merge_requests/331
2019-02-13 09:22:58 -08:00
Christian Boltz
6fd3abe214 Merge branch 'update-vulkan' into 'master'
vulkan: allow reading /etc/vulkan/icd.d/

See merge request apparmor/apparmor!329

Acked-by: Christian Boltz <apparmor@cboltz.de> for 2.12..master

(cherry picked from commit f2c0a1132707256aa3370e6f051965fdef80d7eb)

e322c02c vulkan: allow reading /etc/vulkan/icd.d/
2019-02-10 13:41:06 +00:00
Christian Boltz
6779402786 Merge branch 'backport-kde-213' into 'apparmor-2.13'
Backport kde abstraction to 2.13

See merge request apparmor/apparmor!327

Acked-by: Christian Boltz <apparmor@cboltz.de> for 2.12 and 2.13
2019-02-09 17:27:47 +00:00
Vincas Dargis
dc3b73daf9 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-09 16:17:35 +02:00
Vincas Dargis
aae838faca Update kde abstraction for common settings
Add rules to allow reading common KDE-specific settings, used mostly by
native KDE file dialog.
2019-02-09 16:16:54 +02:00
intrigeri
f5867f1dac 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

(cherry picked from commit 16c47133636f234e368058a2f8019cd314287017)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-01-31 03:31:43 -08:00
intrigeri
6dc7aca07e 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.

(cherry picked from commit 2d72795f6585ad67bc85e01e1dfc8c1bc2eac56a)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-01-31 03:31:11 -08:00
intrigeri
e3230fb5ea Merge branch 'move-drircd' into 'master'
Move drirc.d access to dri-common abstraction

See merge request apparmor/apparmor!314

(cherry picked from commit a5e74c3be31fd5ed179c621308847aedd93fcf63)

2d8d2f06 Move drirc.d access to dri-common abstraction
2019-01-27 16:46:42 +00:00
Marius Tomaschewski
1bc2dfc014 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>
(cherry picked from commit b0bacba9dbe903803ff1a7df05789ac254043490)
2019-01-24 02:45:04 -08:00
Christian Boltz
16832e3f1b drop failing corner-case check in logparser.py
aa-logprof errors out if it hits a log event for a non-existing profile
while a profile file with the default filename for that non-existing
profile exists. This can for example happen after adding a profile name
to a profile if audit.log still contains events for the attachment-based
profile name.

Since we ignore log events for non-existing profiles in general, drop
the code for the special case "but a file matching the default filename
for that non-existing profile exists" and also silently ignore events
for this very special non-existing profile.

References: https://bugzilla.opensuse.org/show_bug.cgi?id=1120472
(cherry picked from commit 03ea5b82b783cd459978bb4c5a6076286c2ce4fa)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-01-24 02:28:19 -08:00
Christian Boltz
a2051bc976 update mysqld profile
This updates the mysqld to what I use on my servers nowadays.

Note: my profile also has capability sys_resource,, but I'm not sure
why I had to add this and therefore didn't include it in this merge
request.

Speaking about "why I had added $whatever" - these changes were
collected over the last years and of course ;-) I don't remember any
details.

PR: https://gitlab.com/apparmor/apparmor/merge_requests/310
(cherry picked from commit 0199edf8e735d3d67488a2b6ea52493b7c379699)
Acked-by: Seth Arnold <seth.arnold@canonical.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-01-23 20:28:13 -08:00
John Johansen
1cc8c72aee Merge branch 'cherry-pick-7bd3029f' into 'apparmor-2.13'
[2.10..2.13] Backport updated font paths

Update fonts for Debian and openSUSE

- Allow to read conf-avail dir itself.
- Add various openSUSE-specific font config directories.

See merge request !96 (merged) for details.

PR: https://gitlab.com/apparmor/apparmor/merge_requests/309

(cherry picked from commit 7bd3029f)
2019-01-24 03:57:43 +00:00
Jamie Strandboge
bae9410ea6 Merge branch 'update-fonts' into 'master'
Update fonts for Debian and openSUSE

See merge request apparmor/apparmor!96

(cherry picked from commit 7bd3029f259464eb2ce1ca378564f0a59a75dc2d)

b902d250 Update fonts for Debian and openSUSE
2019-01-22 22:58:49 +00:00
Christian Boltz
0016e024a3 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

(cherry picked from commit 5d384d96254b2cdbe230e674863158e171cfceb8)

20fe099c dnsmasq: allow peer=libvirtd to support named profile
2019-01-22 22:24:14 +00:00
Christian Boltz
86974e6cd4 Merge branch 'update-mesa' into 'master'
mesa: allow reading drirc.d

See merge request apparmor/apparmor!308

Acked-by: Christian Boltz <apparmor@cboltz.de> for 2.12..master

(cherry picked from commit 91dc2c4c292d21637f3391b666c81bc9f6aac4d7)

b5be5964 mesa: allow reading drirc.d
2019-01-19 17:37:18 +00:00
Christian Boltz
f483d10bb4 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

(cherry picked from commit 027dcdb23f3f7556be989fc9454c9b6ed43b6b53)

12504024 qt5-compose-cache-write: fix anonymous shared memory access
2019-01-14 20:51:20 +00:00
Christian Boltz
f2b1ee5f6e 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

(cherry picked from commit 3e3c90152fa1d31908dc262277849242813f867c)

f1200873 qt5-settings-write: fix anonymous shared memory access
8f6a8fb1 Refactor qt5-settings-write
2019-01-14 20:48:33 +00:00
Christian Boltz
9dbb1bc1f5 Merge branch 'fix-alsa' into 'master'
audio: Fix alsa settings access

See merge request apparmor/apparmor!303

Acked-by: Christian Boltz <apparmor@cboltz.de> for 2.12..master

(cherry picked from commit 808218d8eeaae82129f1bb82aae37851f17847b8)

73f01196 audio: Fix alsa settings access
2019-01-13 16:11:54 +00:00
intrigeri
29f1260230 Make tunables/share play well with aliases.
This reverts commit aa3022208f539978f137c918ede01c80cacd8567.

Space-separated list of values don't play well with aliases.
For example, in Tails, despite this alias rule:

  alias / -> /lib/live/mount/rootfs/*.squashfs/,

… the Tor Browser profile denies access to
/lib/live/mount/rootfs/filesystem.squashfs/usr/share/mime/mime.cache, which
should be equivalent to /usr/share/mime/mime.cache. That's fixed by using
alternations instead; too bad they're less readable.

Possibly related:
https://bugs.launchpad.net/apparmor/+bug/888077
https://bugs.launchpad.net/apparmor/+bug/1703692
https://bugs.launchpad.net/apparmor/+bug/1703692

Cherry-picked from master branch: a91d199ab1da3004cf3744d7087a32c91097a16e.
2019-01-09 17:53:54 +00:00
intrigeri
31cc3f7159 Merge branch 'drg-mods-2' into 'master'
New abstraction: lsb_release (sub-profile).

See merge request apparmor/apparmor!154

(cherry picked from commit 47e38944f3e84c8d414fc4622aa3219cd4d1f330)

f7351405 New profile: lsb_release (no attachment path)
99e45b59 lsb_release: added permissions needed by openSUSE implementation.
2019-01-06 14:02:08 +00:00
Christian Boltz
98a2a107d3 Merge branch 'EmersonBernier/shellcheck' into 'master'
parser/apparmor.systemd: fix minor issues detected by shellcheck

See merge request apparmor/apparmor!293

Acked-by: Christian Boltz <apparmor@cboltz.de> for master and 2.13

(cherry picked from commit a772ee0f8bd569f3db2d89148a5bce3ce1dcd2bd)

b3937d19 parser/apparmor.systemd: fix minor issues detected by shellcheck
2019-01-03 17:42:06 +00:00
Christian Boltz
7a91411704 Merge branch 'var-lib-dehydrated' into 'master'
abstractions/ssl_{certs,keys}: dehydrated uses /var/lib on Debian

See merge request apparmor/apparmor!299

Acked-by: Christian Boltz <apparmor@cboltz.de> for 2.10..master

(cherry picked from commit 1f53de174dbd2ad0409d9b0e5b535a5ff3dff294)

1306f9a6 abstractions/ssl_{certs,keys}: dehydrated uses /var/lib on Debian
c5a89d5d abstractions/ssl_{certs,keys}: sort the alternation for dehydrated and drop...
04b2842e abstractions/ssl_{certs,keys}: allow reading ocsp.der maintained by dehydrated for OCSP stapling
2019-01-03 17:33:03 +00:00
John Johansen
af4808b5f6 Release: Bump revisions in preparation for 2.13.2 release
Signed-off-by: John Johansen <john.johansen@canonical.com>
v2.13.2
2018-12-21 03:16:02 -08:00
John Johansen
f811fa9951 Merge branch 'cboltz-2.13-dnsmasq-name' into 'apparmor-2.13'
[2.12+2.13] revert naming the dnsmasq profile

Changing to "profile dnsmasq /..." broke the peer=/usr/sbin/dnsmasq in the libvirtd profile. Revert adding the name to avoid breaking the libvirtd profile in stable branches.

See also https://bugzilla.opensuse.org/show_bug.cgi?id=1118952 which is a request to update the libvirtd profile to allow both peer=dnsmasq and peer=/usr/sbin/dnsmasq

I propose this revert for 2.12 and 2.13 (older branches didn't get the named profile)

PR: https://gitlab.com/apparmor/apparmor/merge_requests/290

Acked-by: John Johansen <john.johansen@canonical.com>
2018-12-16 05:19:20 +00:00
Christian Boltz
a68e6426f4
revert naming the dnsmasq profile
Changing to "profile dnsmasq /..." broke the peer=/usr/sbin/dnsmasq in
the libvirtd profile. Revert adding the name to avoid breaking the
libvirtd profile in stable branches.

See also https://bugzilla.opensuse.org/show_bug.cgi?id=1118952
which is a request to update the libvirtd profile to allow both
peer=dnsmasq and peer=/usr/sbin/dnsmasq
2018-12-11 19:16:58 +01:00
Christian Boltz
7356f51425 dovecot: allow reading /proc/sys/fs/suid_dumpable
This is needed if a dovecot child process segfaults - in this case,
dovecot provides a helpful error message like

dovecot[6179]: auth-worker: Fatal: master: service(auth-worker): child 8103 killed with signal 11 (core not dumped - https://dovecot.org/bugreport.html#coredumps - set /proc/sys/fs/suid_dumpable to 2)

which involves reading the current value in suid_dumpable.

PR: https://gitlab.com/apparmor/apparmor/merge_requests/286
(cherry picked from commit 2202a8a267111266b74a7c9fd4bbc89a5f334d6a)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2018-12-08 00:32:56 -08:00
Christian Boltz
ef21e9ded7 Ignore *.orig and *.rej files when loading profiles
or: get rc.apparmor.functions in sync with the tools and libapparmor.

This was "accidently" reported by Ralph on the opensuse-support
mailinglist.

PR: https://gitlab.com/apparmor/apparmor/merge_requests/282
(cherry picked from commit 228b92ce5ab287aad76954751cb5e8fb2ea8ce4d)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2018-12-08 00:17:29 -08:00
Jamie Strandboge
1a0016ff17 deny ~/.mutt** in private-files and audit deny ~/.aws in private-files-strict
PR: https://gitlab.com/apparmor/apparmor/merge_requests/276
Signed-Off-By: Jamie Strandboge <jamie@canonical.com>
(cherry picked from commit 170e8d6ac8eb867d40f3361e1814b2304d647860)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2018-12-07 23:00:14 -08:00