[Bug]: AppImage repeatedly requests AppArmor bootstrap despite installed AppArmor profile

Open
#318 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
linux, shell
Domain
desktop, security

Research direction

The bootstrap check lives in the AppRun script, in the condition comparing $AA_PROFILE_PATH with the output of print_apparmor_profile. Start there and check whether the generated profile contains anything that varies between launches, such as the AppImage mount path. Done means a second launch with an already-loaded profile skips the root prompt. No test is mentioned, so you will need to reproduce on Ubuntu with AppArmor enabled.

Written by the indexing model from the issue text.

Description

bug
Version

Version 0.13.6.1 (Official Build, Chromium 149.0.7827.200) appimage (64-bit)

Have you tested that this is not an upstream issue or an issue with your configuration?
  • I have tried reproducing this issue in Chrome and it could not be reproduced there
  • I have tried reproducing this issue in ungoogled-chromium and it could not be reproduced there
  • I have tried reproducing this issue in Helium with a new and empty profile using --user-data-dir command line argument and it could not be reproduced there
Description

The AppImage repeatedly requests AppArmor bootstrap authentication even though the AppArmor profile is already installed, loaded, and matches the generated profile.

How to Reproduce?
  1. Download the official Helium AppImage from https://helium.computer.
  2. Make it executable and launch it.
  3. Approve the AppArmor bootstrap authentication.
  4. Close Helium.
  5. Launch Helium again.

Sometimes Helium requests AppArmor bootstrap authentication again even though the profile already exists and is loaded.

Actual behavior

Helium requests root authentication again to execute:

  • tee /etc/apparmor.d/helium-appimage
  • chmod 644 /etc/apparmor.d/helium-appimage
  • apparmor_parser -r /etc/apparmor.d/helium-appimage

The AppArmor profile is already present and loaded, so the bootstrap should not be necessary.

Expected behavior

After the AppArmor profile has been installed once, Helium should launch normally without requesting root authentication again.

Additional context

Environment:

• Ubuntu 24.04
• GNOME
• AppArmor enabled
• Official Helium AppImage

Investigation performed:

  • /etc/apparmor.d/helium-appimage exists.
  • The profile is loaded (verified with aa-status).
  • The generated profile from AppRun matches the installed profile exactly (verified with diff).
  • aa-enabled returns "Yes".
  • /proc/sys/kernel/apparmor_restrict_unprivileged_userns is 1.

Looking at AppRun, the AppArmor bootstrap condition is:

! [ -f "$AA_PROFILE_PATH" ] ||
[ "$(print_apparmor_profile)" != "$(cat "$AA_PROFILE_PATH")" ]

However, the generated profile and the installed profile are identical, yet Helium still requests AppArmor bootstrap again on launch.

I have not yet tested with a fresh Helium profile (--user-data-dir) or other Chromium builds, as this issue appears to occur before the browser profile is used, during the AppImage AppArmor bootstrap.

The authentication dialogs request permission to run:

  • tee /etc/apparmor.d/helium-appimage
  • chmod 644 /etc/apparmor.d/helium-appimage
  • apparmor_parser -r /etc/apparmor.d/helium-appimage
Image
Dominant language
Shell
Stars
1.1k
Forks
63
Avg merge
28m
Merged PRs (30d)
11

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from imputnet/helium-linux

All issues in imputnet/helium-linux

Similar issues

More Shell/Bash issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.