Menu

#904 custom gpg path ignored in some cases

closed
nobody
None
2.0.8
Major
52
2.2.8
Linux
---
nobody
2018-09-14
2018-09-14
No

In short, for some operations custom gpg path is ignored and automatically detected one is used. This totally breaks Qubes split-gpg, which use a wrapper around gpg to access keys isolated in another VM. Secret are available only through that wrapper, they are not stored in local keyring.

I'm not sure how many operations are affected, but I can reliably reproduce it with sending pgp-inline message with attachments.

Detailed steps to reproduce (log attached):

  1. Start with fresh Thunderbird profile, empty GnuPG keyring
  2. Install Enigmail
  3. Set custom gpg path (/usr/bin/qubes-gpg-client-wrapper) in addon properties.
  4. Close Thunderbird, kill pep-json-server, to be sure it's not about some not reloaded setting.
  5. Start Thunderbird, setup mail account
  6. Go to account settings, "OpenPGP Security", enable "Enable OpenPGP support (Enigmail) for this identity", confirm disabling pep, don't change anything else.

Bug number one: after this step, new key is generated locally (using /usr/bin/gpg2), even though alternative path is set in step 3 and that alternative gpg have access to already existing key for this identity. It can be also seen in enigmail log (it's 75F346B33ED2795E). Relevant key listing:

[user@disp9528 ~]$ gpg2 -K
/home/user/.gnupg/pubring.kbx
-----------------------------
sec   rsa2048 2018-09-14 [SC] [expires: 2019-09-14]
      4F0263E2ED38877B0BC3F7C2A09566B8EBC13766
uid           [ultimate] Test <test123@localhost>
ssb   rsa2048 2018-09-14 [E] [expires: 2019-09-14]

[user@disp9528 ~]$ qubes-gpg-client-wrapper -K test123@localhost
sec   rsa2048 2016-04-18 [SC]
      964C242A7D766E44D40DAFCB75F346B33ED2795E
uid           [ unknown] test123 <test123@localhost>
ssb   rsa2048 2016-04-18 [E]
  1. Compose new message to yourself, enable signing, encrypting (it's enabled by default), add attachment, select "Protocol: Inline PGP" in Enigmail menu.
  2. Click send, confirm signing/encrypting each attachment separately (because of Inline PGP).
  3. Observe error:
    Send operation aborted.
    
    INV_SGNR 9 0x964C242A7D766E44D40DAFCB75F346B33ED2795E
    FAILURE sign-encrypt 17
    

Logs says /usr/bin/gpg2 was used to access key accessible only via /usr/bin/qubes-gpg-client-wrapper.

I have also automated test for this, using dogtail to interact with Thunderbird. But it's probably useless when not running Qubes OS.

1 Attachments

Discussion

  • Patrick Brunschwig

    The problem here is that pEp doesn't consider the path to GnuPG configured in Enigmail. That is, as long as pEp is involved, it will use gpg, and it will create a secret key if no secret key is available.

    The correct sequence for installing Enigmail with Qubes split-gpg must be:

    1. Install Thunderbird and Enigmail
    2. Go to Thunderbird Options > Privacy Tab and set "Force using S/MIME and Enigmail"
    3. Configure Enigmail and your accounts etc.

    Any other sequence of installation is bound to ending up in your "error" case by design.

     
  • Patrick Brunschwig

    • status: open --> closed
     
  • Marek Marczykowski-Górecki

    This indeed works, thanks! It would be helpful to add this info near custom gpg path setting, specifically that:

    • the setting is ignored by pEp
    • pEp needs to be disabled before account setup to use custom gpg path
     

Log in to post a comment.