Skip to content

Pin AppArmor ABI to 3.0 and remove gdbus sub-profile in beta/dev#500

Merged
agners merged 2 commits into
masterfrom
improve-apparmor-profiles
Mar 30, 2026
Merged

Pin AppArmor ABI to 3.0 and remove gdbus sub-profile in beta/dev#500
agners merged 2 commits into
masterfrom
improve-apparmor-profiles

Conversation

@agners

@agners agners commented Mar 30, 2026

Copy link
Copy Markdown
Member

On kernel 6.17+ with AppArmor's new ABI, rule semantics can silently change for unpinned profiles. The known example is network, no longer implying network unix (see containerd/containerd#12897), which our profiles aren't practically affected by (main profile lists explicit network types, git sub-profile gets unix via abstractions/base), but the same class of breakage could hit any rule type. Pinning abi/3.0 locks interpretation to known semantics. The cost is minimal — abi/3.0 ships on every system where we use AppArmor (HAOS 3.1.x, Debian 12+ 3.0.8+), and has been available since 2020.

Also remove the gdbus sub-profile and cx transition rule — gdbus was removed from the Supervisor container in home-assistant/supervisor#3234.

agners and others added 2 commits March 30, 2026 17:48
On kernel 6.17+ with AppArmor's new ABI (v9), rule semantics change
in ways that can silently break profiles — e.g. blanket `network,`
no longer implies `network unix,` (containerd/containerd#12897). Our
profiles aren't practically affected by that specific change since the
main profile already lists explicit network types and the git
sub-profile inherits unix socket access via `abstractions/base`, but
it illustrates the broader risk.

The ABI pin is a contract that guarantees all rules in our profiles
are interpreted under known semantics. Without it, any future kernel
ABI change to how capability, signal, deny, or other rule types work
would silently affect us. We noticed `network,` only because containerd
hit it first, but the same class of problem applies to everything.

The cost is low — abi/3.0 ships on every system where we use AppArmor
(HAOS with AppArmor 3.1.x, Debian 12+ with 3.0.8+). The abi file has
been available since 2020.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
gdbus is no longer present in the Supervisor container since
home-assistant/supervisor#3234. Remove the `cx` transition rule
and the entire gdbus sub-profile.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@sairon sairon changed the title Pin AppArmor ABI to 3.0 and remove gdbus sub-profile Pin AppArmor ABI to 3.0 and remove gdbus sub-profile in beta/dev Mar 30, 2026

@sairon sairon left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I just updated the PR title for better traceability in Git history.

@agners agners merged commit 77c2c6d into master Mar 30, 2026
4 checks passed
@agners agners deleted the improve-apparmor-profiles branch March 30, 2026 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants