Niels Möller nisse@lysator.liu.se writes:
Below patch seems to fix this issue, but not entirely sure that's the way I want to do it.
I've pushed a fix, along the same lines, see https://git.lysator.liu.se/nettle/nettle/-/commit/99e62003c3916fdef04a2d3327...
I believe that should fix all hash update functions (and with proper test coverage).
There are probably a few more functions where 0, NULL should be allowed, but currently result in ubsan issues: Corresponding aead update functions, functions accepting optional nonces, empty messages for rsa encryption functions, maybe some of the cipher modes.
Regards, /Niels