[PATCH 0/4] Patch update, mostly server DoS related

Sven Göthel sgothel at jausoft.com
Sun Jul 19 15:34:04 UTC 2026


I will send 4 current patched from my repo
<https://jausoft.com/cgit/cgit.git/log/>, namely

- 1: cgit: add_repo: Assign default branch from git HEAD to repo->defbranch if 
undefined
  
<https://jausoft.com/cgit/cgit.git/commit/?id=5ccffc927460e651da10a6b0be2e9786129355bb>

- 2: cgit: print_slot: Avoid Slow-Attack via `client-io-idle-timeout` and 
`client-io-min-rate`
  
<https://jausoft.com/cgit/cgit.git/commit/?id=3612cb2a9fbec0052ae6d8f5b5a4a0bb0c3aed35>

- 3: Resolve concurrent initial cache fill post lock. Release lock after fill.
  
<https://jausoft.com/cgit/cgit.git/commit/?id=0771f700a9788cbe7e9f923ebeb8c4b6bf1ab1fa>

- 4: Add cfg cache-lock-fail behavior if failing to acquire cache-file lock
  
<https://jausoft.com/cgit/cgit.git/commit/?id=23472c578356f8ac5a2858ebaa7287bc24c3a5b0>

last 2 are new.
I welcome a merge and/or discussion with the maintainer.

Motivation of this work was to fight DoS attack
on two cgit server, reducing the load by using
- send timeout and min-bandwidth to client
- rely on cache-lock (actually a concurrency fix)
- fail on cache-lock failure -> error page (new default)

Cheers,

~Sven

-- 
mailto:sgothel at jausoft.com ; http://jausoft.com
land : +49 471 9008 7111



More information about the CGit mailing list