Live data from Hacker News

Why did the OpenSSL punycode vulnerability happen?

words.filippo.io

1–10 of 104 posts

Re: Why did the OpenSSL punycode vulnerability happen?

#4

Quoted post unavailable.

The answer to your question is in most if not all arguments against the widespread use of C/C++ in something as high level as OpenSSL. C and C++ ask a lot of developers, mostly in terms of ensuring memory safety. It’s possible to write crappy code in Rust, sure, but the language design has taken the decades of experience of knowing where C falls short and provides a more safe natural path. The long-running rebuttal to this is “it’s as easy as using function x instead of function y!” with the name of function x being some inscrutable derivative of the name of function y. If it’s so easy, why do C codebases keep having the same issues? I’d seriously question the software development experience of someone that doesn’t see the value in reducing developer cognitive load.

Re: Why did the OpenSSL punycode vulnerability happen?

#7
It feels like issues like those are more common in parsers, this specific kind of software.

But why?

Why is parsing so hard? or is it just in low lvl languages? or maybe languages with poor string primitives?

I've written parsers in high level languages and it didnt felt dangerous or insanely hard

Re: Why did the OpenSSL punycode vulnerability happen?

#8

It feels like issues like those are more common in parsers, this specific kind of software. But why? Why is parsing so hard? or is it just in low lvl languages? or maybe languages with poor string primitives? I've written parsers in high level languages and it didnt felt dangerous or insanely hard

Probably low level + safe + performant == hard

Re: Why did the OpenSSL punycode vulnerability happen?

#9
post #8

It feels like issues like those are more common in parsers, this specific kind of software. But why? Why is parsing so hard? or is it just in low lvl languages? or maybe languages with poor string primitives? I've written parsers in high level languages and it didnt felt dangerous or insanely hard

Probably low level + safe + performant == hard

But why? where does the complexity come from

Re: Why did the OpenSSL punycode vulnerability happen?

#10
post #8

Earlier quoted context omitted.

Probably low level + safe + performant == hard

But why? where does the complexity come from

There are naturally lots of edge cases when you parse a format, because you have to constrain the combination of all the different fields.

Some formats are simple and the fields don't interact with each other at all, some are complex and the format changes depending on other values.

Parsing is hard because you have to handle all the possible inputs someone could throw at you, and depending on the format that can leave hundreds of very rare edge case no reasonable human would normally think of.

This is also why fuzzing is so effective on parser, fuzzers are great at throwing many different combinations at the wall until they find a new interesting edge case, and jumping off from there to see if they can mutate it into more.

Post reply on HN