"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
@meena @hipsterelectron @dalias habits of writing that make a typo like this not stand out (ie. one letter differences) are less engineering misdemeanors than stochastic back doors in my opinion.
@d_rift @meena @dalias rich has a policy of not declaring backdoors without proof and i trust him even though this policy is difficult for me to cohere with. i would say that the malice/incompetence argument is one that languages like rust, for a very brief moment, attempted to dissolve with thoughtful and careful ways to manage parallel data structures often used in the firefox web browser (we also found it useful for the pants build tool)
@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