Commit graph

4480 commits

Author SHA1 Message Date
Christian Boltz
954690cff2 Merge branch 'cboltz-fail-verbose' into 'master'
read_profile(): don't fail silently

See merge request apparmor/apparmor!530

Acked-by: Steve Beattie <steve.beattie@canonical.com> for 2.11..master

(cherry picked from commit e0f9b7cb07)

af8b9dc5 read_profile(): don't fail silently
2020-05-12 19:44:10 +00:00
nl6720
b261b92dac
profiles: add trailing slash to the run variable definition
Merge request apparmor/apparmor!466 (454fca7483) pulled back the
@{run} variable definition from apparmor/apparmor!454 (452b5b8735)
to the 2.13 and 2.12 branches, to make backporting profile changes
easier.  However, it did not include the followup fix to the @{run}
definition to include trailing slashes to ensure they are treated as
directories (apparmor/apparmor!456 ef591a67ce).

Signed-off-by: nl6720 <nl6720@gmail.com>
(cherry picked from commit ef591a67ce)
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/533
2020-05-12 12:31:07 -07:00
Christian Boltz
10ffd92137 Merge branch 'cboltz-vim-alias' into 'master'
apparmor.vim: allow leading whitespace for alias rules

See merge request apparmor/apparmor!527

Acked-by: Steve Beattie <steve.beattie@canonical.com> for 2.11..master

(cherry picked from commit ae70ecfbaa)

c636580f apparmor.vim: allow leading whitespace for alias rules
2020-05-10 22:54:54 +00:00
intrigeri
34861ad4c1
libapparmor: fix a Python 3.8 autoconf check
Bug-Debian: https://bugs.debian.org/943657

Author: Matthias Klose <doko@debian.org>
(cherry picked from commit ccbf1e0bf1)

The default ubuntu:latest image has moved to ubuntu 20.04 LTS which
includes python 3.8. Without this fix, the libapparmor configure script
fails against python 3.8, as seen in the gitlab CI build failures.

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/519
2020-05-07 11:15:27 -07:00
Christian Boltz
e41ed413bf Merge branch 'cboltz-less-shell' into 'master'
less shell ;-)

See merge request apparmor/apparmor!520

Acked-by: John Johansen <john.johansen@canonical.com>

(cherry picked from commit 6b55794074)

48bae9e3 less shell ;-)
2020-05-07 17:59:31 +00:00
Christian Boltz
e1e8d1ce10 Merge branch 'cboltz-2.13-genprof-fix-json' into 'apparmor-2.13'
[2.11..2.13] Fix showing the local inactive profile in json mode

See merge request apparmor/apparmor!516

Acked-by: Steve Beattie <steve.beattie@canonical.com> for 2.12 and 2.13

(cherry picked from commit eb5185c961)

6e9dd649 Split off UI_ShowFile() from UI_Changes
da07cdf7 Fix showing the local inactive profile in json mode
2020-05-07 10:18:23 +00:00
Christian Boltz
431004b2ab Merge branch 'cboltz-vim-if-exists' into 'master'
apparmor.vim: support 'include if exists'

See merge request apparmor/apparmor!500

Acked-by: John Johansen <john.johansen@canonical.com> for 2.12..master

(cherry picked from commit a4864146e2)

efa7c6d6 apparmor.vim: support 'include if exists'
2020-05-03 19:28:20 +00:00
Christian Boltz
fb86da21a6 Merge branch 'privacy' into 'master'
Privacy statement

See merge request apparmor/apparmor!441

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

(cherry picked from commit 4281b58c89)

bfde89a6 infrastructure: Add privacy statement to the README
2020-04-26 11:43:38 +00:00
Daniel Gerber
7e38037c0f fix fails to load profiles in busybox with:
egrep: bad regex '^/.[ \t]+flags[ \t]=[ \t]*([ \t]complain[ \t])[ \t]+{': Invalid contents of {}

Note the final non-escaped {.
The issue is not present any more in branch master.

Fixes: https://gitlab.com/apparmor/apparmor/-/issues/80
Signed-off-by: John Johansen <john.johansen@canonical.com>
(cherry picked from commit 95b75a628a)
2020-04-20 16:52:28 -07:00
Christian Boltz
4225857ab1 Merge branch 'profile-usr.sbin.dnsmasq' into 'master'
usr.sbin.dnsmasq: update to support dnsmasq 2.81

See merge request apparmor/apparmor!475

Acked-by: Christian Boltz for 2.11..master

(cherry picked from commit acafe9de82)

88c142c6 usr.sbin.dnsmasq: allow reading @{PROC}/@{pid}/fd/ as is needed by dnsmasq 2.81
2020-04-12 09:45:36 +00:00
nl6720
1660e67a9f Add "run" variable
Define the "run" variable in 2.12 and 2.13 to make backporting profile updates easier.

Fixes: https://gitlab.com/apparmor/apparmor/-/issues/88
PR: https://gitlab.com/apparmor/apparmor/-/merge_requests/466
Signed-off-by: nl6720 <nl6720@gmail.com>
(cherry picked from commit 452b5b8735)
Acked-by: John Johansen <john.johansen@canonical.com>
2020-03-31 15:02:18 -07:00
nl6720
feaae2281a abstractions/nameservice: allow accessing /run/systemd/userdb/
On systems with systemd 245, nss-systemd additionally queries NSS records from systemd-userdbd.service. See https://systemd.io/USER_GROUP_API/ .

(cherry picked from commit 16f9f6885a)
Fixes: https://gitlab.com/apparmor/apparmor/-/issues/82
Signed-off-by: nl6720 <nl6720@gmail.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
2020-03-31 14:07:53 -07:00
Christian Boltz
b555cb2bab Merge branch 'master' into 'master'
Update usr.sbin.winbindd profile to allow krb5 rcache files locking

See merge request apparmor/apparmor!460

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

(cherry picked from commit 5c1932d0d6)

2c3001c7 Update usr.sbin.winbindd profile to allow krb5 rcache files locking
2020-03-23 20:14:52 +00:00
Christian Boltz
67887a16fb Merge branch 'run-uuidd-request' into 'master'
abstractions/base: allow read access to /run/uuidd/request

See merge request apparmor/apparmor!445

Acked-by: John Johansen <john.johansen@canonical.com> for 2.11..master
Acked-by: Christian Boltz <apparmor@cboltz.de> for 2.11..master


(cherry picked from commit 80bf920929)

45fffc12 abstractions/base: allow read access to /run/uuidd/request
2020-02-03 21:17:55 +00:00
Christian Boltz
54852ce29e Merge branch 'gnome-abstraction-more-mimeapps' into 'master'
abstractions/gnome: also allow /etc/xdg/mimeapps.list

See merge request apparmor/apparmor!444

Acked-by: John Johansen <john.johansen@canonical.com> for 2.11..master
Acked-by: Christian Boltz <apparmor@cboltz.de> for 2.11..master


(cherry picked from commit 3becbbab2c)

67cf4fa3 abstractions/gnome: also allow /etc/xdg/mimeapps.list
2020-02-03 21:16:58 +00:00
Christian Boltz
d147319b85 Merge branch 'ecryptfs-top-dir' into 'master'
abstractions/base: allow read access to top-level ecryptfs directories

See merge request apparmor/apparmor!443

Acked-by: John Johansen <john.johansen@canonical.com> for 2.11..master
Acked-by: Christian Boltz <apparmor@cboltz.de> for 2.11..master


(cherry picked from commit 24895ea302)

fbd8981e abstractions/base: allow read access to top-level ecryptfs directories
2020-02-03 21:16:00 +00:00
Ian Johnson
6a968fd15c docs: fix typo in man doc of unix rules
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Steve Beattie <steve@nxnw.org>
(cherry picked from commit f4220a19be)
2020-01-31 22:22:55 -08:00
Christian Boltz
6784de4ba1 Merge branch 'cboltz-backport-tunables-share' into 'apparmor-2.12'
[2.11+2.12] Backport tunables/share to 2.11 and 2.12 branch

See merge request apparmor/apparmor!446

Acked-by: John Johansen <john.johansen@canonical.com>
2020-01-10 12:18:44 +00:00
Christian Boltz
99e2d38cc7
Backport tunables/share to 2.11 and 2.12 branch
Backporting the abstractions/gnome changes resulted in invalid profiles
because 2.11 and 2.12 don't have @{user_share_dirs} defined.

Therefore add/copy over tunables/share from master, and include it in
tunables/global.
2020-01-10 00:04:30 +01:00
John Johansen
80794004e5 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.

PR: https://gitlab.com/apparmor/apparmor/merge_requests/442
Acked-by: John Johansen <john.johansen@canonical.com>


(cherry picked from commit 098f0a7b5f)

852c1e76 gnome abstraction: allow reading per-user themes from $XDG_DATA_HOME
2019-12-17 23:21:00 +00:00
John Johansen
722a61cdb0 Enable CI for the 2.12 branch
This adds a copy of the current .gitlab-ci.yml from master to the 2.12 branch to enable CI checks.

PR: https://gitlab.com/apparmor/apparmor/merge_requests/435
Acked-by: John Johansen <john.johansen@canonical.com>
2019-11-27 23:30:38 +00:00
Christian Boltz
f93f5f6f39
Enable CI for the 2.12 branch
This adds a copy of the current .gitlab-ci.yml from master to the 2.12
branch to enable CI checks.
2019-11-27 23:02:56 +01:00
Christian Boltz
fc5c9c3da7 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

(cherry picked from commit 1cfd4d4bbc)

ee7194a7 Allow /usr/etc/ in abstractions/authentication
2019-11-27 19:41:13 +00:00
Christian Boltz
7793b04dec 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


(cherry picked from commit 663546c284)

dffed831 abstractions/kerberosclient: allow reading /etc/krb5.conf.d/
2019-11-18 21:35:55 +00:00
Christian Boltz
28e4a02306 Merge branch 'cboltz-drop-localinclude' into 'master'
Drop 'localinclude' in parse_profile_data() and ProfileStorage

See merge request apparmor/apparmor!427

Acked-by: John Johansen <john.johansen@canonical.com> for 2.12..master
Acked-by: Steve Beattie <steve@nxnw.org> for 2.12..master

(cherry picked from commit b017f8f8a9)

001ea9e3 Drop 'localinclude' in parse_profile_data() and ProfileStorage
2019-11-18 21:32:46 +00:00
Christian Boltz
a7f7491020 Merge branch 'cboltz-pyflakes-version' into 'master'
README: add PYFLAKES=/usr/bin/pyflakes3 env variable

See merge request apparmor/apparmor!429

Acked-by: John Johansen <john.johansen@canonical.com> for 2.11..master

(cherry picked from commit 1567ea6f4c)

556bb94a README: add PYFLAKES=/usr/bin/pyflakes3 env variable
2019-10-24 21:08:55 +00:00
Christian Boltz
6bb5d5808c Merge branch 'cboltz-status-parenthesis' into 'master'
aa-status: handle profile names containing '('

Closes #51

See merge request apparmor/apparmor!415

Acked-by: John Johansen <john.johansen@canonical.com> for 2.10..master

(cherry picked from commit b76567ce10)

41d26b01 aa-status: handle profile names containing '('
2019-09-23 18:55:53 +00:00
Jamie Strandboge
b0be442ec6 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.

(cherry picked from commit c5968c70d0)
PR: https://gitlab.com/apparmor/apparmor/merge_requests/420
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-09-20 02:49:42 -07:00
Paulo Gomes
887b786aa5 Fix capability mispelling.
PR: https://gitlab.com/apparmor/apparmor/merge_requests/421
(cherry picked from commit 2d19d4d159)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-09-20 02:15:49 -07:00
Tyler Hicks
6c648f4b74 parser: Fix typoed example dbus rule in apparmor.d(5) man page
Remove extra closing parenthesis.

Bug: https://launchpad.net/bugs/1838991
Fixes: 46586a6334 ("parser: Add example dbus rule for unconfined peers")
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>

(cherry picked from commit 7df48adae5)
Ref: https://gitlab.com/apparmor/apparmor/merge_requests/410
Acked-by: Christian Boltz <apparmor@cboltz.de>
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
2019-08-05 17:11:03 +00:00
Christian Boltz
a4f3f48974 Merge branch 'cboltz-unbalanced-parenthesis' into 'master'
Fix crash on unbalanced parenthesis in filename

See merge request apparmor/apparmor!402

Seth Arnold <seth.arnold@canonical.com> for 2.10..master

(cherry picked from commit db1f391844)

8f74ac02 Fix crash on unbalanced parenthesis in filename
2019-07-09 19:45:46 +00:00
Christian Boltz
3ea0ff44ea Merge branch 'cboltz-2.12-fix-utils-test-network' into 'apparmor-2.12'
[2.12] utils/test-network.py: fix failing testcase

See merge request apparmor/apparmor!401

Acked-by: John Johansen <john.johansen@canonical.com> for 2.12
2019-07-01 10:49:40 +00:00
Steve Beattie
069d63a849
utils/test-network.py: fix failing testcase
When dc010bc034 was
backported to the apparmor-2.13 branch (in commit
75236d62e2), it did not take into
account cb8c3377ba, which creates the
common/list_af_names.sh script as used in the test case, was not also
backported to the apparmor-2.13 branch.

Change the test case to get the list of network AF names via the same
make invocation taken by the utils/vim/create-apparmor.vim.py script
before the common/list_af_names.sh existed.

PR: https://gitlab.com/apparmor/apparmor/merge_requests/391
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
(cherry picked from commit 0c65b9aeb9)
2019-06-30 19:23:02 +02:00
Christian Boltz
b5772e29ef Merge branch 'cboltz-2.13-certbot' into 'apparmor-2.13'
[2.10..2.13] Add for Certbot on openSUSE Leap

See merge request apparmor/apparmor!398

Acked-by: John Johansen <john.johansen@canonical.com> for 2.10..2.13

(cherry picked from commit 14a11e67a5)

8b766451 Add for Certbot on openSUSE Leap
2019-06-30 07:14:53 +00:00
John Johansen
f2fb53c6c3 Release: Bumper version for the 2.12.3 release
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-06-18 01:46:41 -07:00
Daniel Richard G
3ae5213241 Updated abstractions to allow writing to some common config dirs
(cherry picked from commit 7972c038d7)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-06-14 04:59:27 -07:00
Daniel Richard G
053b1df7b1 Updated abstractions to allow creating some common config dirs
(cherry picked from commit 094dc741ee)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-06-14 04:59:27 -07:00
Jörg Sommer
e9f12f3adb profiles/gnome: add @{HOME}/.cache/gtk-3.0
Found this path is used by gtk_compose_hash_get_cache_path() in
gtkcomposetable.c.

(cherry picked from commit 6da7ed2a78)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-06-14 04:59:27 -07:00
Daniel Richard G
bcd7ee7b97 ldapclient abstraction: allow rw access to the nslcd socket.
This addresses https://launchpad.net/bugs/1575438 and also the case of
applications accessing the socket directly (due to NSS config).

(cherry picked from commit ac1d0545f4)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-06-14 04:59:27 -07:00
Vincas Dargis
0144df6b75 Update nvidia for reading application profiles
Add file rule to allow reading application profiles for NVIDIA
Linux graphics driver.

(cherry picked from commit f2e0fdc72b)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-06-14 04:59:27 -07:00
segfault
41702a0c35 abstractions/python: allow /usr/local/lib/python3
(cherry picked from commit 548de2f3b8)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-06-14 04:59:27 -07:00
Cameron Nemo
3e71e003c6 abstractions/qt5: read user configuration
Signed-off-by: Cameron Nemo <camerontnorman@gmail.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
(cherry picked from commit 6d81563267)
2019-06-14 04:59:27 -07:00
Christian Boltz
28c8a3a760 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
PR: https://gitlab.com/apparmor/apparmor/merge_requests/361
(cherry picked from commit 234a924480)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-06-13 17:41:43 -07:00
Jörg Sommer
99755daafb parser: Fix parsing of arrow “px -> …”
The parser failed to read the profile name after the the arrow. Rules with
`-> foo-bar;` failed with “Found unexpected character: '-'”. Rules with
`-> @{tgt};` compiled fine, but failed at runtime with “profile transition
not found”.

The patch was written by sbeattie and published on
https://paste.ubuntu.com/p/tzxxmVwGJ8/

https://matrix.to/#/!pNJIrowvqsuGgjXsEY:matrix.org/$15477566201815716pmube:matrix.org?via=matrix.org&via=alea.gnuu.de
PR: https://gitlab.com/apparmor/apparmor/merge_requests/334
(cherry picked from commit 0e0663e99e)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-06-13 17:36:29 -07:00
John Johansen
224b9593e9 parser: Don't skip cache just because optimizations are specified
The parser currently skips the cache if optimizations are specified
because it can not determine if the cached policy was compiled
with the specified optimization. However this causes cache misses
even if policy is cached with those options, and distros are setting
some optimizations by default.

Instead of skipping reading the cache if optimizations are set, users
can force overwriting the cache if needed, until the parser can
store aditional meta info in the cache.

PR: https://gitlab.com/apparmor/apparmor/merge_requests/385
BugLink: http://bugs.launchpad.net/bugs/1820068
Signed-off-by: John Johansen <john.johansen@canonical.com>
(cherry picked from commit f6cd5c01c1)
2019-06-13 17:22:16 -07:00
Christian Boltz
7dcb4a4f77 Merge branch 'cboltz-dovecot-backports' into 'apparmor-2.13'
[2.12+2.13] backport dovecot profile additions

See merge request apparmor/apparmor!389

Acked-by: Seth Arnold <seth.arnold@canonical.com>

(cherry picked from commit 39a81f4a19)

e97af4af backport dovecot profile additions
2019-06-13 20:33:52 +00:00
Christian Boltz
c6b8354fc5 Merge branch 'cboltz-postfix-name' into 'apparmor-2.13'
[2.12+2.13] make abstractions/postfix-common compatible with latest postfix profiles

See merge request apparmor/apparmor!387

Seth Arnold <seth.arnold@canonical.com>

(cherry picked from commit 9318977332)

4573d252 make abstractions/postfix-common compatible with latest postfix profiles
2019-06-13 20:06:43 +00:00
Christian Boltz
1495b65f80 Merge branch 'cboltz-backports-from-2.13' into 'apparmor-2.12'
[2.12] profile backports from 2.13

Backport two profile fixes that made it into 2.13, but not into 2.12:

* dovecot/lmtp: allow dac_read_search
* Allow dovecot-lda to read anything under /usr/share/dovecot/protocols.d/.

See merge request apparmor/apparmor!386

Acked-by: Seth Arnold <seth.arnold@canonical.com>
2019-06-13 19:02:55 +00:00
Christian Boltz
a70161a549
dovecot/lmtp: allow dac_read_search
Fixes https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=887591

(cherry picked from commit 1541175c36)
2019-06-13 20:57:57 +02:00
intrigeri
316f992b41
Allow dovecot-lda to read anything under /usr/share/dovecot/protocols.d/.
On current Debian sid it needs to read
/usr/share/dovecot/protocols.d/imapd.protocol, which is not surprising given it
already needed read access to /usr/share/dovecot/protocols.d/.

(cherry picked from commit 1b51dac4c9)
2019-06-13 20:57:25 +02:00