libreoffice doesn't decrypt my gpg encrypted files

Bug #1905136 reported by Joerg Leonhard
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libreoffice (Ubuntu)
Incomplete
Low
Unassigned

Bug Description

- Encrypting files with gpg key works
- Decrypting does not work, as libreoffice asks for the password but always prompts "wrong password"

(Decrypting the file with libreoffice on Windows does work, so I guess the setup of gpg and the password is correct)

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: libreoffice-calc 1:6.4.6-0ubuntu0.20.04.1
ProcVersionSignature: Ubuntu 5.4.0-54.60-generic 5.4.65
Uname: Linux 5.4.0-54-generic x86_64
ApportVersion: 2.20.11-0ubuntu27.12
Architecture: amd64
CasperMD5CheckResult: skip
CurrentDesktop: XFCE
Date: Sat Nov 21 17:09:27 2020
InstallationDate: Installed on 2020-08-11 (102 days ago)
InstallationMedia: Xubuntu 20.04 LTS "Focal Fossa" - Release amd64 (20200423)
SourcePackage: libreoffice
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Joerg Leonhard (jleonhard) wrote :
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for your bug report. Could you give some details on how you crypt and decrypt the files? Is that just encrypting a libreoffice file using gpg command line and trying to open it with libreoffice?

Changed in libreoffice (Ubuntu):
importance: Undecided → Low
status: New → Incomplete
Revision history for this message
Joerg Leonhard (jleonhard) wrote :

I use the build-in function "Save as..." -> "Encrypt with GPG key" to encrypt the file.

But after saving I can't open the file anymore.

As i am curious I tried to open the file with libreoffice on Windows (after setting up gpg :-) and it works fine. So I draw the conclusion that decryption might be broken in the ubuntu-package.

Revision history for this message
Sebastien Bacher (seb128) wrote :

could you start
$ journalctl -f
try to open the file and include the journal output?

Revision history for this message
Joerg Leonhard (jleonhard) wrote :
Download full text (4.6 KiB)

Nov 24 20:19:46 clever audit[1943]: AVC apparmor="ALLOWED" operation="open" profile="libreoffice-soffice" name="/usr/share/libdrm/amdgpu.ids" pid=1943 comm="soffice.bin" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
Nov 24 20:19:46 clever kernel: audit: type=1400 audit(1606245586.464:52): apparmor="ALLOWED" operation="open" profile="libreoffice-soffice" name="/usr/share/libdrm/amdgpu.ids" pid=1943 comm="soffice.bin" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
Nov 24 20:20:07 clever audit[1979]: AVC apparmor="DENIED" operation="mknod" profile="libreoffice-soffice//gpg" name="/home/joerg/.gnupg/.#lk0x000055d9a86440f0.clever.1979" pid=1979 comm="gpg" requested_mask="c" denied_mask="c" fsuid=1000 ouid=1000
Nov 24 20:20:07 clever audit[1979]: AVC apparmor="DENIED" operation="connect" profile="libreoffice-soffice//gpg" name="/run/user/1000/gnupg/S.gpg-agent" pid=1979 comm="gpg" requested_mask="wr" denied_mask="wr" fsuid=1000 ouid=1000
Nov 24 20:20:07 clever audit[1979]: AVC apparmor="DENIED" operation="mknod" profile="libreoffice-soffice//gpg" name="/home/joerg/.gnupg/.#lk0x000055d9a8657630.clever.1979" pid=1979 comm="gpg" requested_mask="c" denied_mask="c" fsuid=1000 ouid=1000
Nov 24 20:20:07 clever kernel: audit: type=1400 audit(1606245607.400:53): apparmor="DENIED" operation="mknod" profile="libreoffice-soffice//gpg" name="/home/joerg/.gnupg/.#lk0x000055d9a86440f0.clever.1979" pid=1979 comm="gpg" requested_mask="c" denied_mask="c" fsuid=1000 ouid=1000
Nov 24 20:20:07 clever kernel: audit: type=1400 audit(1606245607.400:54): apparmor="DENIED" operation="connect" profile="libreoffice-soffice//gpg" name="/run/user/1000/gnupg/S.gpg-agent" pid=1979 comm="gpg" requested_mask="wr" denied_mask="wr" fsuid=1000 ouid=1000
Nov 24 20:20:07 clever kernel: audit: type=1400 audit(1606245607.400:55): apparmor="DENIED" operation="mknod" profile="libreoffice-soffice//gpg" name="/home/joerg/.gnupg/.#lk0x000055d9a8657630.clever.1979" pid=1979 comm="gpg" requested_mask="c" denied_mask="c" fsuid=1000 ouid=1000
Nov 24 20:20:53 clever audit[1942]: AVC apparmor="ALLOWED" operation="open" profile="libreoffice-soffice" name="/home/joerg/.thunderbird/profiles.ini" pid=1942 comm="soffice.bin" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Nov 24 20:20:53 clever kernel: audit: type=1400 audit(1606245653.568:56): apparmor="ALLOWED" operation="open" profile="libreoffice-soffice" name="/home/joerg/.thunderbird/profiles.ini" pid=1942 comm="soffice.bin" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Nov 24 20:20:53 clever audit[1942]: AVC apparmor="ALLOWED" operation="open" profile="libreoffice-soffice" name="/home/joerg/.thunderbird/7za0wx7b.default/cert9.db" pid=1942 comm="soffice.bin" requested_mask="wrc" denied_mask="wrc" fsuid=1000 ouid=1000
Nov 24 20:20:53 clever audit[1942]: AVC apparmor="ALLOWED" operation="file_lock" profile="libreoffice-soffice" name="/home/joerg/.thunderbird/7za0wx7b.default/cert9.db" pid=1942 comm="soffice.bin" requested_mask="k" denied_mask="k" fsuid=1000 ouid=1000
Nov 24 20:20:53 clever kernel: audit: type=1400 audit(1606245653.568:57): apparmor="ALLOWED" operation="open" profile="libreoffice-soffice" name="/home/joe...

Read more...

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks, the log is useful and shows some apparmor denials, which sounds similar to bug #1886092

Does it work if you do?
 $ sudo aa-complain usr.lib.libreoffice.program.soffice.bin

Revision history for this message
Joerg Leonhard (jleonhard) wrote :

bug #1886092Thanks, in complain-mode the gpg-agent asks for the passphrase (and the file opens :-)
So You're right -> bug #1886092

Revision history for this message
Sebastien Bacher (seb128) wrote :

Great, let's mark it duplicate

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.