git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2] gpg-interface.c: detect and reject multiple signatures on commits

From
Stefan Beller <sbeller@google.com>
Date
Oct 3, 2018, 18:57 UTC
Message-ID
<CAGZ79kZ97saPgp55mY8CPqrxQMo8cmQ+oB7moVTk3hgyRn7tZw@mail.gmail.com>
In-Reply-To
<1538555376.1042.3.camel@gentoo.org>
On Wed, Oct 3, 2018 at 1:29 AM Michał Górny <mgorny@gentoo.org> wrote:
Show 22 quoted lines
>
> On Fri, 2018-08-17 at 09:34 +0200, Michał Górny wrote:
> > GnuPG supports creating signatures consisting of multiple signature
> > packets.  If such a signature is verified, it outputs all the status
> > messages for each signature separately.  However, git currently does not
> > account for such scenario and gets terribly confused over getting
> > multiple *SIG statuses.
> >
> > For example, if a malicious party alters a signed commit and appends
> > a new untrusted signature, git is going to ignore the original bad
> > signature and report untrusted commit instead.  However, %GK and %GS
> > format strings may still expand to the data corresponding
> > to the original signature, potentially tricking the scripts into
> > trusting the malicious commit.
> >
> > Given that the use of multiple signatures is quite rare, git does not
> > support creating them without jumping through a few hoops, and finally
> > supporting them properly would require extensive API improvement, it
> > seems reasonable to just reject them at the moment.
> >
>
> Gentle ping.

I am not an expert on GPG, but the patch (design, code, test) looks reasonable to me.

Previous: Michał GórnyNext: Junio C Hamano
Message 3 of 5 in “gpg-interface.c: detect and reject multiple signatures on commits”
  1. gpg-interface.c: detect and reject multiple signatures on commitsMichał Górny, Aug 17, 2018
  2. Michał GórnyOct 3, 2018
  3. Stefan BellerOct 3, 2018
  4. Junio C HamanoOct 5, 2018
  5. Tacitus AedifexOct 4, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.