GNU bug report logs - #42398
26.3; mm-view-pkcs7-verify not using easypg when set

Previous Next

Package: emacs;

Reported by: "Timothy J. Miller" <tmiller <at> mitre.org>

Date: Thu, 16 Jul 2020 14:54:01 UTC

Severity: normal

Tags: fixed

Found in version 26.3

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 42398 in the body.
You can then email your comments to 42398 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#42398; Package emacs. (Thu, 16 Jul 2020 14:54:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Timothy J. Miller" <tmiller <at> mitre.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 16 Jul 2020 14:54:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "Timothy J. Miller" <tmiller <at> mitre.org>
To: bug-gnu-emacs <at> gnu.org
Subject: 26.3; mm-view-pkcs7-verify not using easypg when set
Date: Thu, 16 Jul 2020 07:45:19 -0500
[Message part 1 (text/plain, inline)]
When EasyPG is enabled, multipart/signed and application/pkcs7-mime
enveloped messages are properly handled.

However, application/pkcs7-mime messages of type signed (aka "opaque
signed") are passed off to smime-verify-region, which is incorrect.

This also happens with messages that are signed and encrypted, in that
case the outer envelope is properly handled, but the inner message is of
type application/pkcs7-mime signed, which then follows the same from
through mm-view-pkcs7.

Backtrace below, sample message attached.
[smime-message (text/plain, attachment)]
[Message part 3 (text/plain, inline)]
-- T

Debugger entered--Lisp error: (error "No CA configured")
  signal(error ("No CA configured"))
  error("No CA configured")
  smime-verify-region(1 6638)
  mm-view-pkcs7-verify((#<buffer  *mm*-886728> ("application/pkcs7-mime" (name . "smime.p7m") (smime-type . "signed-data")) base64 nil ("attachment" (filename . "smime.p7m")) nil nil nil))
  mm-view-pkcs7((#<buffer  *mm*-886728> ("application/pkcs7-mime" (name . "smime.p7m") (smime-type . "signed-data")) base64 nil ("attachment" (filename . "smime.p7m")) nil nil nil) "tmiller <at> mitre.org")
  mm-possibly-verify-or-decrypt((#<buffer  *mm*-886728> ("application/pkcs7-mime" (name . "smime.p7m") (smime-type . "signed-data")) base64 nil ("attachment" (filename . "smime.p7m")) nil nil nil) ("application/pkcs7-mime" (name . "smime.p7m") (smime-type . "signed-data")) "tmiller <at> mitre.org")
  mm-dissect-buffer(nil t)
  gnus-display-mime(nil)
  #f(compiled-function (&optional ihandles) #<bytecode 0x4c10a7d5>)()
  gnus-article-prepare-display()
  mu4e~view-gnus((:docid 14291 :subject "opaque signed" :date (24336 18959 0) :size 10513 :message-id "C1BAD6D4-53C0-402D-9F23-57211A8221B8 <at> MITRE.ORG" :path "/Users/tmiller/Maildir/mitre/INBOX/cur/1594903081.62000_1.MM235917-PC,U=4603:2,S" :maildir "/mitre/INBOX" :priority normal :flags (seen attach) :parts ((:index 1 :name "smime.p7m" :mime-type "application/pkcs7-mime" :type (leaf attachment) :attachment t :size 6477)) :from (("Timothy J Miller" . "tmiller <at> mitre.org")) :to (("Timothy J Miller" . "tmiller <at> mitre.org")) :user-agent "Microsoft-MacOutlook/16.38.20061401"))
  mu4e-view((:docid 14291 :subject "opaque signed" :date (24336 18959 0) :size 10513 :message-id "C1BAD6D4-53C0-402D-9F23-57211A8221B8 <at> MITRE.ORG" :path "/Users/tmiller/Maildir/mitre/INBOX/cur/1594903081.62000_1.MM235917-PC,U=4603:2,S" :maildir "/mitre/INBOX" :priority normal :flags (seen attach) :parts ((:index 1 :name "smime.p7m" :mime-type "application/pkcs7-mime" :type (leaf attachment) :attachment t :size 6477)) :from (("Timothy J Miller" . "tmiller <at> mitre.org")) :to (("Timothy J Miller" . "tmiller <at> mitre.org")) :user-agent "Microsoft-MacOutlook/16.38.20061401"))
  mu4e~headers-view-handler((:docid 14291 :subject "opaque signed" :date (24336 18959 0) :size 10513 :message-id "C1BAD6D4-53C0-402D-9F23-57211A8221B8 <at> MITRE.ORG" :path "/Users/tmiller/Maildir/mitre/INBOX/cur/1594903081.62000_1.MM235917-PC,U=4603:2,S" :maildir "/mitre/INBOX" :priority normal :flags (seen attach) :parts ((:index 1 :name "smime.p7m" :mime-type "application/pkcs7-mime" :type (leaf attachment) :attachment t :size 6477)) :from (("Timothy J Miller" . "tmiller <at> mitre.org")) :to (("Timothy J Miller" . "tmiller <at> mitre.org")) :user-agent "Microsoft-MacOutlook/16.38.20061401"))
  mu4e~proc-filter(#<process  *mu4e-proc*> "\37624b\377(:view (\n\011:docid 14291\n\011:subject \"opaque signed\"\n\011:date (24336 18959 0)\n\011:size 10513\n\011:message-id \"C1BAD6D4-53C0-402D-9F23-57211A8221B8 <at> MITRE.ORG\"\n\011:path \"/Users/tmiller/Maildir/mitre/INBOX/cur/1594903081.62000_1.MM235917-PC,U=4603:2,S\"\n\011:maildir \"/mitre/INBOX\"\n\011:priority normal\n\011:flags (seen attach)\n\011:parts ((:index 1 :name \"smime.p7m\" :mime-type \"application/pkcs7-mime\" :type (leaf attachment) :attachment t  :size 6477  ))\n\011:from ((\"Timothy J Miller\" . \"tmiller <at> mitre.org\"))\n\011:to ((\"Timothy J Miller\" . \"tmiller <at> mitre.org\"))\n\011:user-agent \"Microsoft-MacOutlook/16.38.20061401\"\n)\n)\n\n;; mu> ")


In GNU Emacs 26.3 (build 1, x86_64-apple-darwin18.5.0, Carbon Version 158 AppKit 1671.4)
 of 2020-03-24 built on Traviss-Mac.local
Repository revision: 9827e0bc3344ce5da9be2e2390bc6e319a3a94d8
Windowing system distributor 'Apple Inc.', version 10.15.5
Recent messages:
Entering debugger...
Mark set [2 times]
(New file)
Mark set
mwheel-scroll: Beginning of buffer [3 times]
Saving file /Users/tmiller/projects/scratch/smime-error...
Wrote /Users/tmiller/projects/scratch/smime-error
Making completion list...
mwheel-scroll: Beginning of buffer [4 times]
<s-backspace> is undefined

Configured using:
 'configure --with-mac
 --enable-mac-app=/Users/travis/build/railwaycat/homebrew-emacsmacport/build-scripts/emacs-source/tmproot
 --prefix=/Users/travis/build/railwaycat/homebrew-emacsmacport/build-scripts/emacs-source/tmproot
 --enable-mac-self-contained --with-modules'

Configured features:
NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS MODULES THREADS LCMS2

Important settings:
  value of $LANG: en-US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Fundamental

Minor modes in effect:
  diff-auto-refine-mode: t
  global-flycheck-mode: t
  projectile-mode: t
  eyebrowse-mode: t
  shell-dirtrack-mode: t
  xclip-mode: t
  override-global-mode: t
  xterm-mouse-mode: t
  display-time-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mac-mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  auto-fill-function: do-auto-fill
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow face-remap cl-print debug emacsbug sort gnus-cite smiley
shr-color shr svg xml dom mm-archive mail-extr qp gnus-art mm-uu mml2015
mm-view mml-smime smime dig gnus-sum gnus-group gnus-undo gnus-start
gnus-cloud nnimap nnmail mail-source tls gnutls utf7 netrc nnoo
parse-time gnus-spec gnus-int gnus-range gnus-win gnus nnheader wid-edit
mu4e desktop frameset mu4e-org org-element avl-tree generator org
org-macro org-footnote org-pcomplete org-list org-faces org-entities
org-version ob-emacs-lisp ob ob-tangle org-src ob-ref ob-lob ob-table
ob-keys ob-exp ob-comint ob-core ob-eval org-compat org-macs
org-loaddefs mu4e-main mu4e-view cal-menu calendar cal-loaddefs
browse-url mu4e-headers mu4e-compose mu4e-context mu4e-draft
mu4e-actions rfc2368 smtpmail sendmail mu4e-mark mu4e-message flow-fill
mu4e-proc mu4e-utils doc-view image-mode mu4e-lists hl-line mu4e-vars
message rmc puny rfc822 mml mml-sec gnus-util rmail rmail-loaddefs
mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 mm-util
ietf-drums mail-prsvr mailabbrev mail-utils gmm-utils mailheader
mu4e-meta go-mode url url-proxy url-privacy url-expand url-methods
url-history url-cookie url-domsuf url-util mailcap find-file ffap etags
xref project misearch multi-isearch vc-git diff-mode dired
dired-loaddefs jka-compr ido elec-pair .emacs markdown-mode noutline
outline ini-mode flycheck json map find-func groovy-mode yaml-mode
projectile grep compile ibuf-ext ibuffer ibuffer-loaddefs thingatpt
pcase spaceline-config spaceline-segments spaceline subr-x powerline
powerline-separators color powerline-themes base16-outrun-dark-theme
base16-theme transpose-frame eyebrowse format-spec em-smart
virtualenvwrapper gud s eshell-z em-dirs esh-var esh-io esh-cmd esh-opt
esh-ext esh-proc esh-arg esh-groups eshell esh-module esh-mode esh-util
bash-completion shell pcomplete comint ansi-color ring delight advice
xclip exec-path-from-shell epa-file epa derived epg auto-package-update
dash use-package-ensure-system-package system-packages cl-extra
help-mode use-package use-package-ensure use-package-delight
use-package-diminish use-package-bind-key bind-key easy-mmode
use-package-core finder-inf rx edmacro kmacro info package easymenu
epg-config url-handlers url-parse auth-source cl-seq eieio eieio-core
cl-macs eieio-loaddefs password-cache url-vars seq byte-opt gv bytecomp
byte-compile cconv cl-loaddefs cl-lib xt-mouse time mule-util time-date
tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type
mwheel term/mac-win mac-win term/common-win tool-bar dnd fontset image
regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode
lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932
hebrew greek romanian slovak czech european ethiopic indian cyrillic
chinese composite charscript charprop case-table epa-hook jka-cmpr-hook
help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote threads kqueue mac lcms2 multi-tty make-network-process emacs)

Memory information:
((conses 16 541463 51298)
 (symbols 48 49610 2)
 (miscs 40 1228 482)
 (strings 32 187260 8629)
 (string-bytes 1 6418239)
 (vectors 16 52501)
 (vector-slots 8 1074050 16510)
 (floats 8 527 685)
 (intervals 56 7030 4448)
 (buffers 992 55))

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#42398; Package emacs. (Sat, 17 Oct 2020 10:00:01 GMT) Full text and rfc822 format available.

Message #8 received at 42398 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: "Timothy J. Miller" <tmiller <at> mitre.org>
Cc: 42398 <at> debbugs.gnu.org
Subject: Re: bug#42398: 26.3; mm-view-pkcs7-verify not using easypg when set
Date: Sat, 17 Oct 2020 11:58:49 +0200
"Timothy J. Miller" <tmiller <at> mitre.org> writes:

> When EasyPG is enabled, multipart/signed and application/pkcs7-mime
> enveloped messages are properly handled.
>
> However, application/pkcs7-mime messages of type signed (aka "opaque
> signed") are passed off to smime-verify-region, which is incorrect.
>
> This also happens with messages that are signed and encrypted, in that
> case the outer envelope is properly handled, but the inner message is of
> type application/pkcs7-mime signed, which then follows the same from
> through mm-view-pkcs7.
>
> Backtrace below, sample message attached.

I'm able to reproduce this bug on Emacs 26.3, but not in Emacs 28, so I
think this was probably fixed along with a whole bunch of other related
problems earlier this year.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sat, 17 Oct 2020 10:00:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 28.1, send any further explanations to 42398 <at> debbugs.gnu.org and "Timothy J. Miller" <tmiller <at> mitre.org> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sat, 17 Oct 2020 10:00:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 14 Nov 2020 12:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 163 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.