git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH 0/1] gpg-interface: prefer check_signature() for GPG verification
@ 2019-11-27 17:48 Hans Jerry Illikainen
  2019-11-27 17:48 ` [PATCH 1/1] " Hans Jerry Illikainen
  2020-03-04 11:48 ` [PATCH v1 0/2] " Hans Jerry Illikainen
  0 siblings, 2 replies; 10+ messages in thread
From: Hans Jerry Illikainen @ 2019-11-27 17:48 UTC (permalink / raw)
  To: git; +Cc: Hans Jerry Illikainen

This patch refactors the use of verify_signed_buffer() for GPG
verification to use check_signature() instead.

Previously, both check_signature() and verify_signed_buffer() were used
to verify signatures in various parts of Git.  However,
verify_signed_buffer() does not parse the GPG status message.  Instead,
it relies entirely on the exit code from GPG coupled with the existence
of a GOODSIG string in the output buffer.  Unfortunately, the mere
prescience of GOODSIG does not necessarily imply a valid signature, as
shown by Michał Górny [1].

verify_signed_buffer() should be reserved for internal use by
check_signature() since check_signature() parses and verifies the status
message.  This is accomplished in this patch.

Note that the patch is prepared for the next branch.  I'm not sure if
that's appropriate -- but it seemed sensible since I've already touched
code in gpg-interface.c that's been merged in next.

[1] https://dev.gentoo.org/~mgorny/articles/attack-on-git-signature-verification.html

Hans Jerry Illikainen (1):
  gpg-interface: prefer check_signature() for GPG verification

 builtin/fmt-merge-msg.c | 11 +++--
 gpg-interface.c         | 97 +++++++++++++++++++++--------------------
 gpg-interface.h         |  9 ----
 log-tree.c              | 30 +++++++------
 4 files changed, 72 insertions(+), 75 deletions(-)

--
2.24.GIT

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-03-15 16:40 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-27 17:48 [PATCH 0/1] gpg-interface: prefer check_signature() for GPG verification Hans Jerry Illikainen
2019-11-27 17:48 ` [PATCH 1/1] " Hans Jerry Illikainen
2019-11-30 21:57   ` Junio C Hamano
2020-03-04 11:48 ` [PATCH v1 0/2] " Hans Jerry Illikainen
2020-03-04 11:48   ` [PATCH v1 1/2] t: increase test coverage of signature verification output Hans Jerry Illikainen
2020-03-14 23:25     ` Johannes Schindelin
2020-03-15 16:40       ` Junio C Hamano
2020-03-04 11:48   ` [PATCH v1 2/2] gpg-interface: prefer check_signature() for GPG verification Hans Jerry Illikainen
2020-03-05 18:44   ` [PATCH v1 0/2] " Junio C Hamano
2020-03-06 11:59     ` Johannes Schindelin

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).