"a buffer-length typo reduces a 2048-bit DH modulus to one byte" press 4 to doubt
@hipsterelectron FFS those clowns have their severities backwards. The one labeled medium is critical and the one labeled critical is medium-low.
@dalias i really don't like the phrasing "buffer length typo". that's a completely unserious thing to say
@hipsterelectron It really was. They mixed up sizeof(foo_g) with sizeof(foo_p).
@dalias i don't think that's a reasonable explanation and a retrospective analysis would completely rewrite the section of the code so this mistake can't occur. where i disagree with the rust enthusiasts is that entirely replacing the language and runtime is necessary to achieve this semantic correctness such that the behavior is obvious at a glance
@hipsterelectron @dalias I had to read this code 15 times to spot the difference between p and g
the fact that such a significant difference is marked by one letter that looks the same just flipped is crazy
like, there has to be more to say about the variables than p/g when one is size 1 and one is size 2048
this is the reason i hated reading OpenSSL's code: there's no hope understanding the motivations of the authors oluji
@hipsterelectron to the article's author: "a typo? well, SHOW ME"
@jn so they do apparently but i adamantly refuse the snivelling language https://aus.social/@umbrella/117515231749479584
@hipsterelectron
- mbedtls_ssl_conf_dh_param_bin(conf, dhm_p, sizeof(dhm_g), dhm_g, sizeof(dhm_g))
+ mbedtls_ssl_conf_dh_param_bin(conf, dhm_p, sizeof(dhm_p), dhm_g, sizeof(dhm_g))
oh god, this needs a safety macro that puts the same name in the corresponding pointer/size parameters