bug#42398: 26.3; mm-view-pkcs7-verify not using easypg when set

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

bug#42398: 26.3; mm-view-pkcs7-verify not using easypg when set

Timothy J. Miller
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.


-- 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) "[hidden email]")
  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")) "[hidden email]")
  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 "[hidden email]" :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" . "[hidden email]")) :to (("Timothy J Miller" . "[hidden email]")) :user-agent "Microsoft-MacOutlook/16.38.20061401"))
  mu4e-view((:docid 14291 :subject "opaque signed" :date (24336 18959 0) :size 10513 :message-id "[hidden email]" :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" . "[hidden email]")) :to (("Timothy J Miller" . "[hidden email]")) :user-agent "Microsoft-MacOutlook/16.38.20061401"))
  mu4e~headers-view-handler((:docid 14291 :subject "opaque signed" :date (24336 18959 0) :size 10513 :message-id "[hidden email]" :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" . "[hidden email]")) :to (("Timothy J Miller" . "[hidden email]")) :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 \"[hidden email]\"\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\" . \"[hidden email]\"))\n\011:to ((\"Timothy J Miller\" . \"[hidden email]\"))\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))

smime-message (10K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

bug#42398: 26.3; mm-view-pkcs7-verify not using easypg when set

Lars Ingebrigtsen
"Timothy J. Miller" <[hidden email]> 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