2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-08-22 01:57:43 +00:00

1631 Commits

Author SHA1 Message Date
Maxime Bélair
91c5e9639c Merge Add curl profile
In order to test the profile, I did the following inside an oracular VM:

- `curl https://ubuntu.com/ -o /tmp/ubuntu`
- `curl 'https://ubuntu.com/security/{CVE-2024-12797,CVE-2025-24032}' -o '#1'`
- `curl -u dlpuser:rNrKYTX9g7z3RgJRmxWuGHbeu ftp://ftp.dlptest.com/`

Finally, I ran the package's testsuite:
```
apt source curl
cd curl-8.9.1
./configure --without-ssl # SSL has been tested using the above
make
cd test/server
make
cd ..
./runtests.pl -c $(which curl)
```

The only test which should fail should be the last one, since the build was configured with support for less protocols than the ones provided by the binary we're using (this is expected and happens regardless of whether the profile is loaded or not).

A spread smoke-test is also provided as part of this MR.

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/1560
Approved-by: Ryan Lee <rlee287@yahoo.com>
Merged-by: Maxime Bélair <maxime.belair@canonical.com>
2025-06-23 13:49:24 +00:00
Octavio Galland
37a4b6cb81 Add curl profile 2025-06-23 13:49:23 +00:00
Maxime Bélair
a431a6e80b Merge profiles/apparmor.d: add mosquitto profile
Adds apparmor profile for https://mosquitto.org/ `plucky 2.0.20-2`.

In a production and customized environment, this profile would need overriding as many configuration options in `mosquitto.conf` are file paths which can point anywhere. This profile adds all sensible defaults required for mosquitto to work out of the box with TLS.

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/1506
Approved-by: Georgia Garcia <georgia.garcia@canonical.com>
Approved-by: Maxime Bélair <maxime.belair@canonical.com>
Merged-by: Maxime Bélair <maxime.belair@canonical.com>
2025-06-23 13:28:55 +00:00
Maxime Bélair
61a3a4862e Merge Add profile for mbsync tool
Source package isync

Let me know if you think we should better handle any mail or different mbsyncrc location that the user might have.
As well if I should simplify the network access to `include <abstractions/nameservice>` or if that's too much.

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/1372
Approved-by: Ryan Lee <rlee287@yahoo.com>
Merged-by: Maxime Bélair <maxime.belair@canonical.com>
2025-06-23 13:25:41 +00:00
Maxime Bélair
2c685c0a17 Merge Add dnstracer profile
Add profile for `dnstracer`. The profile has been tested with `dnstracer` for oracular i.e. version `1.9-8build1`.

Signed-off-by: vyomydv <vyom.yadav@canonical.com>

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/1366
Approved-by: Georgia Garcia <georgia.garcia@canonical.com>
Approved-by: Maxime Bélair <maxime.belair@canonical.com>
Merged-by: Maxime Bélair <maxime.belair@canonical.com>
2025-06-23 08:09:56 +00:00
Ryan Lee
9a04cd58a6 profiles: restore exec path rules from profiles where they were removed
These profiles don't have an attachment so the path needs to be hardcoded

Fixes: 6e9ff1fa6 ("profiles: update the rest of the profiles to use @{exec_path}")
Signed-off-by: Ryan Lee <ryan.lee@canonical.com>
2025-06-17 10:53:14 -07:00
Maxime Bélair
d068678112 Merge initial john the ripper
@jjohansen had mentioned to me when he suggested this profile that there was smth he noticed about john that gave him the impression it was a good candidate for confinement. I think that would be the only thing I'd want to call out - wondering whether something like this captures that spirit or if there's something else worth including.

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/1662
Approved-by: Maxime Bélair <maxime.belair@canonical.com>
Merged-by: Maxime Bélair <maxime.belair@canonical.com>
2025-06-12 05:56:26 +00:00
Eduardo Barretto
3d25f1c80f
profiles: mbsync: Allow mmap as it is needed for other architectures 2025-06-11 11:33:34 +02:00
Eduardo Barretto
a7003f4d49
profiles: mbsync: Use openssl abstraction instead 2025-06-11 11:33:30 +02:00
Eduardo Barretto
bb422c1f01
profile: mbsync: Move vim tag 2025-06-11 11:33:27 +02:00
Eduardo Barretto
76338c29f2
mbsync: Add read to gss
This was needed when testing the profile in Oracular
2025-06-11 11:33:23 +02:00
Eduardo Barretto
00a1152700
mbsync: Add missing write permission to create any folders existent 2025-06-11 11:33:20 +02:00
Eduardo Barretto
5f0fcfcae9
profiles: mbsync: make use of nameservice-strict abstraction
Signed-off-by: Eduardo Barretto <eduardo.barretto@canonical.com>
2025-06-11 11:33:16 +02:00
Eduardo Barretto
74ad177d07
Add profile for mbsync tool
Source package isync

Signed-off-by: Eduardo Barretto <eduardo.barretto@canonical.com>
2025-06-11 11:33:12 +02:00
Ryan Lee
9f70004058 profiles: add additional rules needed for lsusb under sudo + other flags
Fixes: https://bugs.launchpad.net/ubuntu/+source/usbutils/+bug/2110212
Signed-off-by: Ryan Lee <ryan.lee@canonical.com>
2025-06-09 12:56:36 -07:00
Federico Quattrin
bf207941ad update pci sys devices rules 2025-06-06 13:56:39 -07:00
Federico Quattrin
61d5f1a56f removed abstractions/nameservice and added network netlink raw 2025-06-06 13:56:39 -07:00
Federico Quattrin
2634352a75 update lsusb profile name 2025-06-06 13:56:39 -07:00
Federico Quattrin
7af7fd35e5 include local lsusb profile if exists
Signed-off-by: Federico Quattrin <federico.quattrin@canonical.com>
2025-06-06 13:56:39 -07:00
Federico Quattrin
65f8bd4d82 added a few more rules for lsusb to cover verbose mode
Signed-off-by: Federico Quattrin <federico.quattrin@canonical.com>
2025-06-06 13:56:39 -07:00
Federico Quattrin
22023ce70b added lsusb profile
Signed-off-by: Federico Quattrin <federico.quattrin@canonical.com>
2025-06-06 13:56:39 -07:00
Julia Sarris
3c6db7c14b Merge branch apparmor:master into master 2025-06-04 14:27:35 +00:00
Maxime Bélair
e426cc983d Merge Allow lsblk to access Xen PVH disk devices
Fixes: https://bugs.launchpad.net/ubuntu/+source/apparmor/+bug/2111604

Signed-off-by: Christian Kujau <launchpad@nerdbynature.de>

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/1702
Approved-by: Georgia Garcia <georgia.garcia@canonical.com>
Approved-by: Ryan Lee <rlee287@yahoo.com>
Merged-by: Maxime Bélair <maxime.belair@canonical.com>
2025-06-03 14:53:55 +00:00
Julia Sarris
b019f9ef08 Merge branch apparmor:master into master 2025-06-03 14:18:41 +00:00
John Johansen
f8b5e5d9a4 Merge profiles: provide backwards compat for hwctl profile
The hwctl profile is being carried upstream, so we can keep it in
sync, but is being packaged from the regular profile set so that it
can be part of a package that is SRUed (ubuntu stable release update)
separate from the rest of apparmor, and its profiles.

Provide backwards compat with older parser to reduce the amount of
distro patching that is needed.

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

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/1705
Approved-by: Maxime Bélair <maxime.belair@canonical.com>
Merged-by: John Johansen <john@jjmx.net>
2025-06-02 21:43:59 +00:00
Julia Sarris
d9d1776579 add owner back to rule lines 2025-06-02 16:29:57 -04:00
Julia Sarris
edf42d4f79 nameservice strict 2025-06-02 09:58:53 -04:00
Julia Sarris
f382920950 private files strict 2025-06-02 09:50:44 -04:00
Julia Sarris
3356f5ea0a Merge branch apparmor:master into master 2025-06-02 13:50:13 +00:00
John Johansen
df41185eb2 profiles: provide backwards compat for hwctl profile
The hwctl profile is being carried upstream, so we can keep it in
sync, but is being packaged from the regular profile set so that it
can be part of a package that is SRUed (ubuntu stable release update)
separate from the rest of apparmor, and its profiles.

Provide backwards compat with older parser to reduce the amount of
distro patching that is needed.

Signed-off-by: John Johansen <john.johansen@canonical.com>
2025-05-30 13:24:17 -07:00
Ryan Lee
f826e1dbea Allow noexec mounts in fusermount3 profile
The permissive flags should be revisited once we have rule delegation

Signed-off-by: Ryan Lee <ryan.lee@canonical.com>
2025-05-27 15:40:21 -04:00
Christian Kujau
34d889f6e9 Use @{int} instead of ranges
Thanks @cboltz for the hint!
2025-05-25 13:06:08 +00:00
Christian Kujau
1e74ae32ea Allow lsblk to access Xen PVH disk devices
For details, please see:
https://bugs.launchpad.net/ubuntu/+source/apparmor/+bug/2111604
2025-05-23 22:37:45 +00:00
Nadzeya H
cd7586776c
remove dpkg and lsb_release usage in usr.bin.hwctl 2025-05-23 17:16:55 +02:00
Maxime Bélair
97dc70606b Merge add apparmor profile for dig
MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/1525
Approved-by: Ryan Lee <rlee287@yahoo.com>
Approved-by: Maxime Bélair <maxime.belair@canonical.com>
Merged-by: Maxime Bélair <maxime.belair@canonical.com>
2025-05-21 14:48:05 +00:00
Shishir Subedi
be143350fd add apparmor profile for dig 2025-05-21 14:48:05 +00:00
Julia Sarris
bef7b32d24 john update 2025-05-20 14:42:50 -04:00
Julia Sarris
bece53da7b Merge branch apparmor:master into master 2025-05-20 18:42:03 +00:00
John Johansen
e55646c41c Merge profiles: only include tests extras/abstractions/ if it exists
profiles make check was showing an error because
profiles/extras/abstractions didn't exist, so only include tests for
it if it exists. This commit also deduplicates the abstractions test.

Signed-off-by: Georgia Garcia <georgia.garcia@canonical.com>

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/1687
Approved-by: John Johansen <john@jjmx.net>
Merged-by: John Johansen <john@jjmx.net>
2025-05-14 12:15:57 +00:00
Georgia Garcia
52da04d951 profiles: only include tests extras/abstractions/ if it exists
profiles make check was showing an error because
profiles/extras/abstractions didn't exist, so only include tests for
it if it exists. This commit also deduplicates the abstractions test.

Signed-off-by: Georgia Garcia <georgia.garcia@canonical.com>
2025-05-14 12:08:01 +02:00
Ryan Lee
e36b57857f profiles: give lsof network netlink dgram permissions
Signed-off-by: Ryan Lee <ryan.lee@canonical.com>
2025-05-14 09:45:53 +02:00
John Johansen
84c3e629e4 Merge unix-chkpwd: Add read capability to profile
Following the Security Technical Implementation Guide, it is better to
set the permissions to 0000 for the shadow file.
However, since PAM version 1.6.0, after this change [0], unix-chkpwd
will unconditionnaly read the shadow file. And with the previous
restriction, the binary has an access denied to the shadow which
blocks user authentications. Moreover the PAM changes is needed to fix
the CVE-2024-10041.
Giving the read caability to the unix-chkpwd profile allows it to
function properly. See bug report [1].

[0] - https://github.com/linux-pam/linux-pam/pull/686
[1] - https://bugzilla.suse.com/show_bug.cgi?id=1241678

Signed-off-by: vlefebvre <valentin.lefebvre@suse.com>

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/1685
Approved-by: John Johansen <john@jjmx.net>
Merged-by: John Johansen <john@jjmx.net>
2025-05-13 16:00:21 +00:00
Maxime Bélair
c8dc701666 Merge Add netcat-openbsd profile
MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/1327
Approved-by: Maxime Bélair <maxime.belair@canonical.com>
Merged-by: Maxime Bélair <maxime.belair@canonical.com>
2025-05-13 07:22:31 +00:00
vlefebvre
556396a172 unix-chkpwd: Add read capability to profile
Following the Security Technical Implementation Guide, it is better to
set the permissions to 0000 for the shadow file.
However, since PAM version 1.6.0, after this change [0], unix-chkpwd
will unconditionnaly read the shadow file. And with the previous
restriction, the binary has an access denied to the shadow which
blocks user authentications. Moreover the PAM changes is needed to fix
the CVE-2024-10041.
Giving the read caability to the unix-chkpwd profile allows it to
function properly. See bug report [1].

[0] - https://github.com/linux-pam/linux-pam/pull/686
[1] - https://bugzilla.suse.com/show_bug.cgi?id=1241678

Signed-off-by: vlefebvre <valentin.lefebvre@suse.com>
2025-05-12 15:53:33 +00:00
Maxime Bélair
2e875f22fe Merge profiles: small fix for gs profile
Allow gs to run from confined environment by explicitly allowing access
to /usr/bin/gs.

Signed-off-by: Maxime Bélair <maxime.belair@canonical.com>

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/1684
Approved-by: Ryan Lee <rlee287@yahoo.com>
Merged-by: Maxime Bélair <maxime.belair@canonical.com>
2025-05-12 14:43:13 +00:00
Maxime Bélair
672bfcb72b Merge ProFTPD Profile
Creates an AA profile for ProFTPD. The profile has been tested on Oracular with version `1.3.8.b+dfsg-2ubuntu1`, using the source integration/unit tests and via FTP commands. As an FTP package any directory can be used for manipulating files. I've included read/write permissions to several usual locations located at the end of the profile. However these are too loose, any suggestions for how they could be tightened is much appreciated. Thanks!

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/1524
Approved-by: Maxime Bélair <maxime.belair@canonical.com>
Merged-by: Maxime Bélair <maxime.belair@canonical.com>
2025-05-12 14:27:28 +00:00
bruce-canonical
e892093c06 ProFTPD Profile 2025-05-12 14:27:27 +00:00
Maxime Bélair
acc0811c37 profiles: small fix for gs profile
Allow gs to run from confined environment by explicitly allowing access
to @{exec_path}.

Signed-off-by: Maxime Bélair <maxime.belair@canonical.com>
2025-05-12 16:23:04 +02:00
Maxime Bélair
16fd1dab67 Merge profiles: add a who profile
Signed-off-by: Ryan Lee <ryan.lee@canonical.com>

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/1634
Approved-by: Maxime Bélair <maxime.belair@canonical.com>
Merged-by: Maxime Bélair <maxime.belair@canonical.com>
2025-05-12 14:19:51 +00:00
Maxime Bélair
2a7b84cd73 Merge Initial lsof profile (+ comments)
Initial profile for review + extra descriptions to summarize why each rule / chunk is there.

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/1486
Approved-by: John Johansen <john@jjmx.net>
Merged-by: Maxime Bélair <maxime.belair@canonical.com>
2025-05-12 14:19:20 +00:00