List for cgit developers and users
 help / color / mirror / Atom feed
From: Jason at zx2c4.com (Jason A. Donenfeld)
Subject: [PATCH 0/3] Fix segfault found by AFL
Date: Sun, 19 Feb 2017 20:04:49 +0100	[thread overview]
Message-ID: <CAHmME9rYXHZBPp_sXxhyWr8eL68yynzsci2U1biocWW0htYZ6g@mail.gmail.com> (raw)
In-Reply-To: <CAHmME9r8zY9qOqbg7fwuB1gW76nXVcsqJ-LT2-6sjD3SuoJ-HQ@mail.gmail.com>

Excellent. Running AFL on cgit is a great idea. I'll merge and review when
I'm back at my desk on Tuesday.

On Feb 19, 2017 12:45, "John Keeping" <john at keeping.me.uk> wrote:

I set AFL [0] loose on CGit's URL input yesterday and it managed to find
one issue that leads to a segfault via a null dereference.

Either of the first or third patches fixes the segfault, but I much
prefer the first as a solid fix, the third is a bit too subtle as a way
to ensure that the necessary invariant holds.

The second patch also fixes the route that AFL found, but it's possible
to get the same effect using broken out query parameters like
"?p=log&path=foo" but I'm including it because it seems to make sense to
use the value of the final "url" parameter we receive fully rather than
some combination of that and a previous URL.

[0] http://lcamtuf.coredump.cx/afl/

John Keeping (3):
  ui-shared: don't print path crumbs without a repo
  parsing: clear query path before starting
  cgit: don't set vpath unless repo is set

 cgit.c      | 12 ++++++------
 parsing.c   |  2 +-
 ui-shared.c |  2 +-
 3 files changed, 8 insertions(+), 8 deletions(-)

--
2.12.0.rc2.230.ga28edc07cd

_______________________________________________
CGit mailing list
CGit at lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/cgit
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.zx2c4.com/pipermail/cgit/attachments/20170219/ae91003c/attachment-0001.html>


  parent reply	other threads:[~2017-02-19 19:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-19 12:44 john
2017-02-19 12:44 ` [PATCH 1/3] ui-shared: don't print path crumbs without a repo john
2017-02-19 12:45 ` [PATCH 2/3] parsing: clear query path before starting john
2017-02-19 12:45 ` [PATCH 3/3] cgit: don't set vpath unless repo is set john
     [not found] ` <CAHmME9r8zY9qOqbg7fwuB1gW76nXVcsqJ-LT2-6sjD3SuoJ-HQ@mail.gmail.com>
2017-02-19 19:04   ` Jason [this message]
2017-02-20  1:48     ` [PATCH 0/3] Fix segfault found by AFL peter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAHmME9rYXHZBPp_sXxhyWr8eL68yynzsci2U1biocWW0htYZ6g@mail.gmail.com \
    --to=cgit@lists.zx2c4.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 NNTP newsgroup(s).