News for hackers. Stuff that matters.
Re:nginx: 1-byte memory overwrite vulnerability in DNS resol... by geofft on Tuesday May 25, 2021 @05:34PM (#27282987)
The Phrack "vudo" writeup from 2001 was about getting arbitrary code execution given a one-byte out-of-bounds heap write that replaced something with a NUL byte and immediately set it back.

http://phrack.org/issues/57/8.html

Re:nginx: 1-byte memory overwrite vulnerability in DNS resol... by zibzab on Tuesday May 25, 2021 @05:31PM (#27282946)
The DNS protocol is just a landmine even for the most experienced developers. Just look at those recursive name fields!

I think it's time we come up with something better.

Re:nginx: 1-byte memory overwrite vulnerability in DNS resol... by wahern on Tuesday May 25, 2021 @07:05PM (#27283912)
As far as compression algorithms go, DNS' algorithm is ridiculously simple. Switching compression algorithms wouldn't improve security. At best it'd be a lateral move; more likely it'd be a net security loss. We would likely get better compression, though.

If the response is that people would just reuse pre-existing compression libraries, the exact same thing could be said here. In fact, Unix systems provide `dn_expand` and `dn_comp` in libc (e.g. BSDs, Linux/glibc, Linux/musl) or another system library (e.g. -lresolv on Solaris). And of course nginx could have used one of countless other DNS libraries, such as libunbound.

Re:nginx: 1-byte memory overwrite vulnerability in DNS resol... by inshadows on Tuesday May 25, 2021 @05:42PM (#27283081)
Like what? Are you going to split the world into two incompatible protocols because of little things like field names?
Re:nginx: 1-byte memory overwrite vulnerability in DNS resol... by zibzab on Tuesday May 25, 2021 @05:45PM (#27283120)
Like a DNSv2 with a more sane encoding scheme.

Given how slow dnssec is being adopted, maybe if we hurry our children can enjoy DNSv2

Re:nginx: 1-byte memory overwrite vulnerability in DNS resol... by tptacek on Wednesday May 26, 2021 @10:24PM (#27298641)
DoH has lots of uptake. So does DKIM. The reason DNSSEC is moribund is that it doesn't solve real problems for ordinary people. I wouldn't be so pessimistic about getting real new stuff deployed.
Re:nginx: 1-byte memory overwrite vulnerability in DNS resol... by inshadows on Wednesday May 26, 2021 @11:13AM (#27291561)
What's insane on DNS encoding scheme? Do you consider binary encoding insane? Would you like to re-engineer protocols down to Ethernet to use JSON? For what reason exactly?

You suggest breaking compatibility for everyone on this planet without giving any specific reason for doing so.

Re:nginx: 1-byte memory overwrite vulnerability in DNS resol... by zibzab on Friday May 28, 2021 @07:20AM (#27314047)
Please read the rfc, then think about how a naive implementation of the name encoding can be abused.

We have had many vulnerabilities related to that single section of the standard over 30 years. At some point you have to ask yourself if the problem lies with the developers or the standard.

Re:nginx: 1-byte memory overwrite vulnerability in DNS resol... by nly on Wednesday May 26, 2021 @03:24AM (#27287423)
I feel like implementing the DNS name decompression algorithm would be a grueling interview question
Re:nginx: 1-byte memory overwrite vulnerability in DNS resol... by superkuh on Tuesday May 25, 2021 @06:53PM (#27283802)
The patch described on the vulnerability page worked 1-to-1 for in two nginx versions I fixed. But in nginx 1.20 in ./src/core/ngx_resolver.c the second replacement does not match the existing if (len == -1){contents} and I had to remove some extra bits based on what seemed right it manually.
Re:nginx: 1-byte memory overwrite vulnerability in DNS resol... by luismerino on Wednesday May 26, 2021 @03:47AM (#27287591)
You might want to go with the official fix: https://nginx.org/download/patch.2021.resolver.txt
Re:nginx: 1-byte memory overwrite vulnerability in DNS resol... by superkuh on Wednesday May 26, 2021 @08:10PM (#27297766)
Thanks! I'll recompile with that now that it is out.
Re:nginx: 1-byte memory overwrite vulnerability in DNS resol... by artifact_44 on Tuesday May 25, 2021 @07:10PM (#27283962)
Uh. That sounds.. kinda bad in the context of something like.... DNS.