fix(sec): use constant time check for internal token

This commit is contained in:
Gusted 2024-10-25 08:18:26 +02:00 committed by Earl Warren
parent 00379db370
commit 53231bad61
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
2 changed files with 3 additions and 1 deletions

1
release-notes/5719.md Normal file
View file

@ -0,0 +1 @@
Forgejo generates a token which is used to authenticate web endpoints that are only meant to be used internally, for instance when the SSH daemon is used to push a commit with Git. The verification of this token was not done in constant time and was susceptible to [timing attacks](https://en.wikipedia.org/wiki/Timing_attack). A pre-condition for such an attack is the precise measurements of the time for each operation. Since it requires observing the timing of network operations, the issue is mitigated when a Forgejo instance is accessed over the internet because the ISP introduce unpredictable random delays.