[apparmor] missing entry for CLUSTERIP (used by strongswan HA plugin)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
strongswan (Ubuntu) |
Fix Released
|
High
|
Christian Ehrhardt | ||
Bionic |
Fix Released
|
Undecided
|
Unassigned | ||
Cosmic |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
[Impact]
* when using the ha plugin an apparmor Deny is triggered
* Fix by allowing charon to access CLUSTERIP
[Test Case]
* get a VM to test this as it might mess up your networking
* install strongswan and libcharon-
$ sudo apt install strongswan libcharon-
* Edit /etc/strongswan
ha {
load = yes
local = 192.168.122.248
monitor = yes
remote = 192.168.122.94
resync = yes
}
With your IP and a peer IP (both KVM guests for me)
* $ sudo iptables -I INPUT -i ens3 -d 10.10.10.10 -j CLUSTERIP --new --hashmode sourceip --clustermac 01:00:5E:00:00:20 --total-nodes 2 --local-node 1
Please make sure your network device matches above, the IPs can be kept as-is unless you have a collision
* With that set up restart the service
$ sudo systemctl restart strongswan
* Without the fix this will break the ha plugin early based on the
mentioned apparmor DENY
Note: this does not provide a full ha setup, since this simple setup is
enough to trigger and verify the issue.
[Regression Potential]
* This is only opening up one more (actually uncommon other than HA
setups) path to charon, I'd not expect existing functionality to
regress due to that.
[Other Info]
* n/a
----
When using the HA plugin, charon-systemd try to read '@{PROC}
So the 2 rules may be append to charon-
# Cluster IP
@{PROC}
@{PROC}
Related branches
- Andreas Hasenack (community): Approve
- Canonical Server: Pending requested
- git-ubuntu developers: Pending requested
-
Diff: 59 lines (+18/-0)4 files modifieddebian/changelog (+10/-0)
debian/usr.lib.ipsec.charon (+4/-0)
debian/usr.lib.ipsec.lookip (+2/-0)
debian/usr.lib.ipsec.stroke (+2/-0)
- Andreas Hasenack (community): Approve
- Canonical Server: Pending requested
- git-ubuntu developers: Pending requested
-
Diff: 59 lines (+18/-0)4 files modifieddebian/changelog (+10/-0)
debian/usr.lib.ipsec.charon (+4/-0)
debian/usr.lib.ipsec.lookip (+2/-0)
debian/usr.lib.ipsec.stroke (+2/-0)
- Andreas Hasenack (community): Approve
- Canonical Server packageset reviewers: Pending requested
- git-ubuntu developers: Pending requested
-
Diff: 81 lines (+26/-2)4 files modifieddebian/changelog (+10/-0)
debian/usr.lib.ipsec.charon (+7/-0)
debian/usr.sbin.charon-systemd (+6/-2)
debian/usr.sbin.swanctl (+3/-0)
- Andreas Hasenack (community): Approve
- Canonical Server: Pending requested
- git-ubuntu developers: Pending requested
-
Diff: 2323 lines (+1744/-90)22 files modifieddebian/changelog (+1317/-0)
debian/control (+122/-6)
debian/ipsec.secrets.proto (+0/-3)
debian/libcharon-extra-plugins.install (+64/-12)
debian/libcharon-standard-plugins.install (+19/-0)
debian/libstrongswan-extra-plugins.install (+55/-0)
debian/libstrongswan.install (+11/-6)
debian/patches/dont-load-kernel-libipsec-plugin-by-default.patch (+11/-0)
debian/patches/lp1795813-mysql-Don-t-release-the-connection-if-transactions-a.patch (+40/-0)
debian/patches/series (+2/-0)
debian/rules (+49/-6)
debian/strongswan-starter.install (+4/-0)
debian/strongswan-starter.postinst (+0/-57)
debian/strongswan-tnc-base.install (+16/-0)
debian/strongswan-tnc-client.install (+5/-0)
debian/strongswan-tnc-ifmap.install (+3/-0)
debian/strongswan-tnc-pdp.install (+3/-0)
debian/strongswan-tnc-server.install (+10/-0)
debian/usr.lib.ipsec.charon (+4/-0)
debian/usr.lib.ipsec.lookip (+2/-0)
debian/usr.lib.ipsec.stroke (+2/-0)
debian/usr.sbin.charon-systemd (+5/-0)
CVE References
Changed in strongswan (Ubuntu Bionic): | |
status: | New → Incomplete |
Changed in strongswan (Ubuntu Cosmic): | |
status: | New → Incomplete |
Changed in strongswan (Ubuntu): | |
status: | Confirmed → Triaged |
Changed in strongswan (Ubuntu): | |
status: | Triaged → In Progress |
assignee: | nobody → Christian Ehrhardt (paelzer) |
Changed in strongswan (Ubuntu Cosmic): | |
status: | Incomplete → Confirmed |
Changed in strongswan (Ubuntu Bionic): | |
status: | Incomplete → Confirmed |
Changed in strongswan (Ubuntu): | |
status: | Triaged → In Progress |
description: | updated |
description: | updated |
description: | updated |
Looks like here is the bug where apparmor support was added for charon-system:
https:/ /bugs.debian. org/cgi- bin/bugreport. cgi?bug= 866327
There does not seem to be any reference to ipt_CLUSTERIP there and from the source it appears the libcharon does appear to try to write to the referenced dir:
./src/libcharon /plugins/ ha/ha_kernel. c:#define CLUSTERIP_DIR "/proc/ net/ipt_ CLUSTERIP"