logoalt Hacker News

echoangleyesterday at 9:41 PM5 repliesview on HN

> This is why calling str.lower() represents a difference in the implementation and the specification, and therefore a vulnerability:

I wish there was some explanation how this is a vulnerability and not just a bug generating erroneous data.

Vulnerability for me sounds like there’s a reasonable way to create an exploit from the bug, and I don’t see one here as someone who’s not very familiar with the topic.


Replies

SethMLarsonyesterday at 9:45 PM

Author here, that's a good idea. A straightforward way to exploit an implementation differential like this is if you have a software system that contains two different implementations of IDNA 2003 processing user input. One part of the process processes the domain correctly, the other incorrectly, and in this case you can have one part of a system (such as a policy/filter) "see" the data one way and the other part of the system (such as, taking an action as a result of the data) see the data in another way.

Server-side Request Forgery (SSRF) is an example of such an exploit targeting a differential in implementations of URL parsers, which is similar to this implementation difference.

show 1 reply
tptacekyesterday at 9:47 PM

It creates a parser differential; two different components of the system can treat the same string as different hostnames. Things that have trusted hostnames, or privileged/admin hostnames that are screened out, or SSRF filters all depend on accurately comparing presented hostnames.

This is pretty situational, though, isn't it? You still have to be dealing with IDN names.

show 1 reply
floxyyesterday at 9:58 PM

I suppose I could envision a scenario like: Service A has a "reset your password" option. Someone with a "[email protected]" tries to use this option. Normally this fails when mangled-popular-unicode-domain-plus-garbage.com can't be found. Enterprising malicious actor registers mangled-popular-unicode-domain-plus-garbage.com, and now gets a hold of user password reset requests.

wren6991yesterday at 10:23 PM

My favourite example of this is the Chromium bug where enabling floating point flush-to-zero for WebAudio was used to cause deliberate heap corruption: https://issues.chromium.org/issues/382005099

> We have a working exploit (OOB access in the V8 heap), our security folks put one together based on the example I posted above (and they're cleaning it up to post it here). In general, we find that correctness issues like this are pretty much always exploitable with a bit of effort (not even that much effort normally, just gluing together a few gadgets), so we treat correctness issues as security issues until they are proven not to be, rather than the other way around.

The floating-point-to-heap-corruption chain here is... uniquely JavaScript, but in general getting two different implementations to disagree is the start of lots of interesting inconsistent behaviour.

zapharyesterday at 9:47 PM

I'm too lazy to investigate further but my guess is that if there is a vulnerability here it has something to do with dns name spoofing.