mirror of
http://thekelleys.org.uk/git/dnsmasq.git
synced 2026-11-28 21:08:35 +00:00
295d5467055ecdbad118748fde788c13d2966887
The pipe from a TCP handler process to the main dnsmasq process is used to return information back to the main process, normally RRsets for caching, but other messages too. This all normally happens synchronously, but there's one situation where this is not true. If the TCP handler process last for too long, it is reaped by ALARM signal, and if the TCP handler process is working on DNSSEC validation which started in UDP mode, but got promoted to TCP, then a report of that fact gets sent to the main process so that the blocked UDP query can be released to fail. By it's nature this happens asynchronously and if the alarm signal interrupts whilst another message is being send down the pipe, the two messages get interleaved and garbage results. If this happens by accident the usual result to a crash, but it could be manipulated by an attacker to poison the cache or overwrite random memory. The fix is to block the alarm signals whilst other processes are sending messages down the pipe. Thanks to Daniel Wade for finding and analysing this problem.
Languages
C
94.3%
Perl
2.2%
HTML
1.2%
Shell
1%
Makefile
0.6%
Other
0.6%