apparmor:cherry-pick-baa8b672

Last commit made on 2024-05-08
Get this branch:
git clone -b cherry-pick-baa8b672 https://git.launchpad.net/apparmor

Branch merges

Branch information

Name:
cherry-pick-baa8b672
Repository:
lp:apparmor

Recent commits

eee5053... by Georgia Garcia

Merge MountRule: Relaxing constraints on fstype and completing AARE support

 - Before this commit, fstype had to match a known fs. However, having and maintaining the exhaustive list of fstypes proved challenging (see !1195 and !1176). Therefore, we add support for any filesystem name.
 - Completing AARE support for fstype (brace expressions like ext{3,4} are now supported).

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/1198
Approved-by: Christian Boltz <email address hidden>
Merged-by: Christian Boltz <email address hidden>

(cherry picked from commit baa8b67248f3467cde40683600d7a945b05f9a3b)

dad5ee28 MountRule: Relaxing constraints on fstype and completing AARE support

Co-authored-by: Christian Boltz <email address hidden>

86be5d3... by Christian Boltz

util/test/: Don't rely on argparse saying "options:"

Some argparse versions (for example on openSUSE Leap 15.5) instead say
"optional arguments:"

Don't rely on the "options:" line to allow both wordings.

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/1226
Approved-by: Steve Beattie <email address hidden>
Cherrypicked-by: Steve Beattie <email address hidden>

b7f9b66... by Georgia Garcia

Merge gitlab-ci.yml: fix pipeline for ubuntu:latest (noble)

Since we are using ubuntu:latest, and noble was released, some tests
are failing.

shellcheck needs python3 to run, which was possibly installed by
default in previous ubuntu images and is no longer the case.

Ignore dist-packages python files during our coverage tests.

Fixes: https://gitlab.com/apparmor/apparmor/-/issues/388

Signed-off-by: Georgia Garcia <email address hidden>

Closes #388
MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/1223
Merged-by: Steve Beattie <email address hidden>

(cherry picked from commit 8c9ac7a84eeff7bbf49e7bedb6f05be08d1dd6a3)

731880de gitlab-ci.yml: fix pipeline for ubuntu:latest (noble)
aaad725a apparmor.systemd: fix shellcheck false positive

Co-authored-by: Steve Beattie <email address hidden>

6d1e5db... by John Johansen <email address hidden>

Merge profiles: add fixes for samba from issue #386

Signed-off-by: Alex Murray <email address hidden>

Fixes: https://gitlab.com/apparmor/apparmor/-/issues/386
MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/1219
Approved-by: John Johansen <email address hidden>
Merged-by: John Johansen <email address hidden>
(cherry picked from commit 1457eada8b421b4f39eb6e1381efecd2f3adcac7)
Signed-off-by: John Johansen <email address hidden>

f117337... by John Johansen <email address hidden>

Merge Fix redefinition of _

... which unsurprisingly broke using the translations.

This was a regression introduced in 4f51c93f9dc2516a32bfccc79b4dcf4985e61f47

Fixes: https://gitlab.com/apparmor/apparmor/-/issues/387

This fix is needed in 4.0 and master. (3.x branches are not affected.)

Closes #387
MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/1218
Approved-by: John Johansen <email address hidden>
Merged-by: John Johansen <email address hidden>

(cherry picked from commit 79226675fdfd99a2a260802b02a5f812ccc9d3f0)
Signed-off-by: John Johansen <email address hidden>

b0eb954... by John Johansen

Prepare for AppArmor 4.0.1 release

AppArmor 4.0.1 will be the official release superseding the 4.0.0 tag
the only change being it adds a regression test for CVE-2016-1585

- update version file

Signed-off-by: John Johansen <email address hidden>

5ad4efe... by John Johansen <email address hidden>

Merge regression tests: add mount test for CVE-2016-1585

Add infrastructure for calling the mount test binary with an fstype
instead of using the default hardcoded ext2 type, and then use that in a
test that exercises CVE-2016-1585, ensuring that mounting a procfs
filesystem isn't permitted when the only mount rule is

  mount options=(rw,make-slave) -> **,

to try to ensure that the generated and enforced policy is restricted to
what is intended.

Signed-off-by: Steve Beattie <email address hidden>
Bug: https://bugs.launchpad.net/ubuntu/+source/apparmor/+bug/1597017

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/1211
Approved-by: John Johansen <email address hidden>
Merged-by: John Johansen <email address hidden>
(cherry picked from commit 93c4c6fb9f3c837d1f26700d8d33a97303737e23)
Signed-off-by: John Johansen <email address hidden>

a635a86... by John Johansen

Prepare for AppArmor 4.0 release

- update version file

Signed-off-by: John Johansen <email address hidden>

c8e25e4... by John Johansen <email address hidden>

Merge parser: add network inet mediation documentation to apparmor.d

This updates the man page for the recent inet mediation patch.

This is an extension of MR 1202, it adds a patch that changes the anonymous ip address anon to be ip address none which is a better fit.

This patch adds documentation of the recent network changes which extended all network rules to support access permissions, and added address and port matching for inet and inet6 families.

Signed-off-by: Georgia Garcia <email address hidden>

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/1213
Approved-by: John Johansen <email address hidden>
Merged-by: John Johansen <email address hidden>
(cherry picked from commit ab9e6311f33296bee11bdd24561a5d3b7b5bbd78)
Signed-off-by: John Johansen <email address hidden>

68dd052... by John Johansen <email address hidden>

Merge parser: inet conditionals should only generate rules for inet family

When a family is specified in the network rules, we have to make sure
the conditionals match the family. A netlink rule should not be able
to specify ip and port for local and remote (peer) sockets, for example.

When type or protocol is specified in network rules along with inet
conditionals, we should only generate rules for the families that
support those conditionals.

Fixes: https://gitlab.com/apparmor/apparmor/-/issues/384
Signed-off-by: Georgia Garcia <email address hidden>

Closes #384
MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/1210
Approved-by: John Johansen <email address hidden>
Merged-by: John Johansen <email address hidden>

(cherry picked from commit a0acf7785daaee64cc41d302e64de98bdba99251)
Signed-off-by: John Johansen <email address hidden>