Public bug reported:

On Ubuntu 26.04 "File > Send > Document as E-mail" in LibreOffice opens the mail
composer without the attachment (and without the subject).

The AppArmor profile /etc/apparmor.d/libreoffice-senddoc allows
/usr/bin/dirname, /usr/bin/basename and /{usr/,}bin/uname, but with
coreutils-from-uutils these are symlinks to /usr/lib/cargo/bin/coreutils/*,
and AppArmor checks the resolved target. senddoc therefore cannot run them:

  senddoc: 20: dirname: Permission denied
  senddoc: 22: uname: Permission denied
  senddoc: 66: basename: Permission denied
  senddoc: 325: /uri-encode: not found

  apparmor="DENIED" operation="exec" class="file" profile="libreoffice-senddoc"
  name="/usr/lib/cargo/bin/coreutils/basename" comm="senddoc" requested_mask="x"
  denied_mask="x"

Because URI_ENCODE=$(dirname "$0")/uri-encode fails, the subject and the
attachment are lost and the mailer is called with just "subject=".

This is the same class of problem as LP: #2123870 (the bug description lists
the senddoc profile), but libreoffice has no task there and the profile is
still unfixed.

Steps to reproduce:
1. Ubuntu 26.04, default mail client Thunderbird.
2. Open any document in Writer, File > Send > Document as E-mail.
3. Composer opens without attachment; see DENIED messages in journalctl -k.

Suggested fix: use the @{coreutil_dirs} tunable 
(/etc/apparmor.d/tunables/coreutils)
like the other profiles fixed in LP: #2123870, e.g.
  @{coreutil_dirs}/{dirname,basename,uname} rmix,

Workaround: /etc/apparmor.d/local/libreoffice-senddoc with
  /usr/lib/cargo/bin/coreutils/basename rmix,
  /usr/lib/cargo/bin/coreutils/dirname rmix,
  /usr/lib/cargo/bin/coreutils/uname rmix,
and apparmor_parser -r /etc/apparmor.d/libreoffice-senddoc.

Related: the profile only allows xdg-email/xdg-open, so setting the mail
program explicitly (e.g. /usr/bin/thunderbird) in Tools > Options > Internet >
E-mail is also denied.

Versions:
  Ubuntu 26.04.1 LTS
  libreoffice-common 4:26.2.6.3-0ubuntu0.26.04.2
  apparmor 5.0.2-0ubuntu1~26.04.1
  rust-coreutils 0.10.0-1ubuntu2~26.04.1
  coreutils-from-uutils 0.0.0~ubuntu25

ProblemType: Bug
DistroRelease: Ubuntu 26.04
Package: libreoffice-common 4:26.2.6.3-0ubuntu0.26.04.2
ProcVersionSignature: Ubuntu 7.0.0-38.38-generic 7.0.14
Uname: Linux 7.0.0-38-generic x86_64
ApportVersion: 2.34.1-0ubuntu0.1
Architecture: amd64
CasperMD5CheckResult: unknown
CurrentDesktop: KDE
Date: Tue Oct  6 23:52:16 2026
InstallationDate: Installed on 2020-03-13 (2398 days ago)
InstallationMedia: Kubuntu 19.10 "Eoan Ermine" - Release amd64 (20191017)
PackageArchitecture: all
SourcePackage: libreoffice
UpgradeStatus: Upgraded to resolute on 2026-10-05 (1 days ago)

** Affects: libreoffice (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug resolute wayland-session

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2169767

Title:
  AppArmor profile libreoffice-senddoc denies rust-coreutils (basename,
  dirname, uname): "Send document as e-mail" attaches nothing

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libreoffice/+bug/2169767/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to