dropbear icon indicating copy to clipboard operation
dropbear copied to clipboard

curve255.19.c:91:12: runtime error: left shift of negative value -329

Open sbytnar opened this issue 1 year ago • 1 comments

To reproduce this, build curve25519.c with -fsanitize=undefined. gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.2)

Run the dropbear server from the command line. Connect to the dropbear server. The message is printed on the console.

sbytnar avatar Jun 19 '24 13:06 sbytnar

Putting if (c < 0) printf at line 91 I can reproduce it, though I couldn't get ubsan to catch it. It certainly looks like undefined behaviour, I'll figure how to fix that.

The curve25519 implementation is from tweetnacl, I'm surprised the problem hasn't been reported elsewhere (that I can find).

mkj avatar Jun 19 '24 14:06 mkj