List for cgit developers and users
 help / color / mirror / Atom feed
From: Marko Zajc <marko@zajc.eu.org>
To: cgit@lists.zx2c4.com
Subject: SEGV in cgit-1.2.3 on following logs of a nonexistent file with cache
Date: Sun, 25 Jun 2023 04:46:44 +0200	[thread overview]
Message-ID: <6615b2e7-625b-93d5-76dd-5c5185dfd3b3@zajc.eu.org> (raw)


[-- Attachment #1.1.1: Type: text/plain, Size: 1242 bytes --]

Dear cgit developers,

I would like to report a segmentation fault in cgit that can be 
reproduced with the following steps:

1. Set `enable-follow-links` to `1`
2. Set `cache-size` to a non-zero value. I'm not sure if this only
    occurs on specific values, but I've tried a few numbers in the 1 –
    10000 range and they all cause this to happen
3. Have cgit installed and active at least one repository
4. Try following the log of a file that doesn't exist, for example
    `https://git.zx2c4.com/cgit/log/file-that-doesnt-exist?follow=1`

On certain repositories, I am able to consistently reproduce this with 
the above steps, but others seem unaffected. Changing the `cache-size` 
value between 1 and N does not seem to change which repositories are 
affected, but I didn't try that on a very large sample size. For example:

  * git://zajc.eu.org/xheadset.git *is not affected* by this, but
  * git://zajc.eu.org/gogarchiver.git *is affected*

I don't have the stack trace, but I can try getting one in case you're 
unable to reproduce this issue.

I am using Debian 12's build of cgit 1.2.3. I have disabled 
`enable-follow-links` on my own website, so it won't exhibit this behaviour.

- Marko Zajc


[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 6205 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

                 reply	other threads:[~2023-06-25  2:47 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=6615b2e7-625b-93d5-76dd-5c5185dfd3b3@zajc.eu.org \
    --to=marko@zajc.eu.org \
    --cc=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).