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

Re: [PATCH 0/2] upload-pack: handle unexpected v2 delim packets

From
Taylor Blau <me@ttaylorr.com>
Date
Mar 27, 2020, 15:18 UTC
Message-ID
<20200327151829.GA30577@syl.local>
In-Reply-To
<20200327080210.GA604725@coredump.intra.peff.net>
Hi Peff,
On Fri, Mar 27, 2020 at 04:02:10AM -0400, Jeff King wrote:
Show 23 quoted lines
> We saw an upload-pack segfault in the wild today at GitHub. It's caused
> by a client sending bogus v2 protocol lines (a "delim" packet instead of
> a "flush"). So the client is broken and our only option is to break the
> network connection, but we shouldn't segfault while doing so. :)
>
> I don't think the broken client was Git. It didn't send an "agent"
> capability at all, which makes me suspect it was somebody generating the
> request manually (nor was there anything interesting in the transport
> layer agent; it was just an openssh client).
>
> The fix was simple enough, and is in the second patch. The first one is
> just a small cleanup / refactor in preparation.
>
>   [1/2]: test-lib-functions: make packetize() more efficient
>   [2/2]: upload-pack: handle unexpected delim packets
>
>  ls-refs.c                              |  5 +++-
>  t/t5562-http-backend-content-length.sh | 19 +++++++++------
>  t/t5704-protocol-violations.sh         | 33 ++++++++++++++++++++++++++
>  t/test-lib-functions.sh                | 23 ++++++++++++------
>  upload-pack.c                          |  5 +++-
>  5 files changed, 69 insertions(+), 16 deletions(-)
>  create mode 100755 t/t5704-protocol-violations.sh
Thanks. This series looks good to me, and is certainly improving things.
  Reviewed-by: Taylor Blau <me@ttaylorr.com>
> -Peff

Thanks, Taylor

Previous: Taylor Blau
Message 16 of 16 in “upload-pack: handle unexpected v2 delim packets”
  1. 0/2 upload-pack: handle unexpected v2 delim packetsJeff King, Mar 27, 2020
  2. 1/2 test-lib-functions: make packetize() more efficientJeff King, Mar 27, 2020
  3. Taylor BlauMar 27, 2020
  4. Jeff KingMar 28, 2020
  5. Junio C HamanoMar 27, 2020
  6. Jeff KingMar 28, 2020
  7. Junio C HamanoMar 29, 2020
  8. Junio C HamanoMar 29, 2020
  9. Jeff KingMar 29, 2020
  10. Junio C HamanoMar 29, 2020
  11. Jeff KingMar 29, 2020
  12. test-lib-functions: simplify packetize() stdin codeJeff King, Mar 29, 2020
  13. Junio C HamanoMar 29, 2020
  14. 2/2 upload-pack: handle unexpected delim packetsJeff King, Mar 27, 2020
  15. Taylor BlauMar 27, 2020
  16. Taylor BlauMar 27, 2020

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.