This became a very complex SRU to process, even with the MariaDB special
case documentation. There are many changes to packaging, and I didn't
even get to look at the noble changes yet.
Let's start with the more simple things, besides my security-team
question from the previous comment (which also needs addressing).
a) the dash profile
@@ -171,8 +186,104 @@ profile mariadbd /usr/sbin/mariadbd
flags=(attach_disconnected) {
# Allow network interface enumeration (for Java/Connect engine)
@{PROC}/@{pid}/net/if_inet6 r,
- # Allow OS detection (lsb_release)
+ # Allow Galera helpers. This should be mostly fine since it's providing the
+ # 'i' option which keeps the shells confined according to the rules of the
+ # existing profile.
+ /usr/bin/dash rcx,
There is no "i" option.
+
+ # Detailed profile for 'dash' so Galera can use it
+ # Origin: support-files/policy/apparmor/usr.sbin.mysqld
+ profile /usr/bin/dash flags=(complain) {
+ #include <abstractions/base>
(...)
It's hard to confine something like dash, which will execute shell
scripts that likely call out to tons of utilities. Is this really worth
it? I see the profile is in complain mode, but all that means is we are
treading tons of DENIED messages with tons of ALLOWED ones, and induce
apparmor-fatigue.
b) Add-AppArmor-notice-for-Debian-Ubuntu-users-during-server.patch
This reads /sys/kernel/security/apparmor/profiles to determine if
mariadb is confined or not, but that path doesn't seem to be allowed by
the profile itself. Have you checked that this is working, or will every
mariadb startup now print a DENIED for that path?
c) bugs missing SRU template
Bugs https://bugs.launchpad.net/ubuntu/+source/mariadb/+bug/2168416 and
https://bugs.launchpad.net/ubuntu/+source/mariadb/+bug/2153455 are also in the
changes file for this update, but do not have the SRU template filled in. And
they are about apparmor. How will they be tested?
d) apparmor profile and capabilities
You are adding capabilities to the apparmor profile:
+ # Required to raise file-descriptor and memory limits beyond hard defaults
+ capability sys_resource,
+ # Required to read files owned by root (e.g., SSL keys, config files)
+ # while running as unprivileged mysql user (uid 122)
+ capability dac_override,
+ capability dac_read_search,
+ # Required for privilege dropping and user switching operations
+ capability setuid,
+ capability setgid,
But the systemd service unit does not grant them, and it starts the mariadb
service as an unprivileged user:
(...)
[Service]
Type=notify
PrivateNetwork=false
User=mysql
Group=mysql
AmbientCapabilities=CAP_IPC_LOCK
...
I checked support-files/mariadb.service.in and not the rendered profile
in a mariadb install, but a quick clance at the @macros@ in that .in
file doesn't hint at any other capability being added after it's
rendered. Could you clarify please?
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2168592
Title:
[SRU] MariaDB 11.8.9, 10.11.19, 10.6.28 in all maintained Ubuntu
releases
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/mariadb/+bug/2168592/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs