Open catenacyber opened 1 year ago
cc @golang/security
x/crypto/blowfish is a painfully low level package which will panic in a handful of ways if you hold it incorrectly, it would ideally be an internal package only used for bcrypt, but for backwards compatibility reasons that is not really possible.
Given there are no error returns, and often doing nothing may actually be more dangerous than panicking, the only real fix is probably to introduce purposeful panics which catch these issues before they happen, 🤷.
Thanks for the answer.
An explicit panic with a string instead of index out of range is fine for me :-)
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Run https://go.dev/play/p/QMNkWgpIag1
What did you expect to see?
The program finishing and printing Hello
What did you see instead?
Found by https://github.com/catenacyber/ngolo-fuzzing
Is this relevant ? (Should not panic and do nothing if the slice is empty)