Test dnsmasq available, fix for potential cache poisoning vulnerability
While the author of dnsmasq does not feel it is susceptible to the recent DNS vulnerability “panic”, he did release an updated RC version including query source port randomization. It appears dnsmasq is not vulnerable because it does not do any recursive queries – it relies entirely upon your ISP’s DNS servers or internal ones you have defined. Hence it appears that as long as your ISP isn’t vulnerable, you aren’t vulnerable. If you have instead defined internal DNS servers, they are the ones that will need to be patched.
The DNS server package in pfSense uses djbdns, which is the only major DNS server package that was not vulnerable.
We feel it’s safe to say this probably does not affect dnsmasq in pfSense – but we can’t say for sure until the details are released at Black Hat in August. This fix is still a good one to deploy because it makes other potential cache poisoning vectors much more difficult.
Please help us test this new version of dnsmasq. This is for 1.2-release systems only, those using 1.2.1 or 1.3 snapshots can update by installing a new full update from the snapshot server. We have been testing it and have not found any issues.
To install the updated dnsmasq on pfSense 1.2 full installs:
- Go to a command prompt (SSH or Diagnostics -> Command)
- Run the following commands one by one.
killall dnsmasq
mv /usr/local/sbin/dnsmasq /root/
fetch -o /usr/local/sbin http://cvs.pfsense.org/~sullrich/dnsmasq
chmod +x /usr/local/sbin/dnsmasq
/usr/local/sbin/dnsmasq
At that point you will be running the updated dnsmasq and everything should be working properly.
Thanks to dnsmasq author
Thanks much to Simon Kelley for making a dnsmasq update available so quickly, and promptly replying to our inquiry!
Updated release information
Once this fix has been more widely tested, we will release pfSense 1.2a with only this change. Based on the information we have available, this currently does not warrant a wrecklessly quick fix with the potential cost of stability. All things at this time point to this specific issue being applicable only to servers that issue recursive queries, and hence not dnsmasq.
Tags: 1.2a
July 10th, 2008 at 7:44 am
I’ve tested it and no problems occurs. I have patched 30 pfsense (with the old dnsmasq backed up). If any problem occurs I’ll give feedback
July 10th, 2008 at 8:17 am
Works like a charm here on 2 systems…
No problems occured…
July 11th, 2008 at 1:24 pm
Thanks for this udate. 2 machines are OK.
How about 1.3? Does this fix can be applied to 1.3?
(Should test it for myself, but I’d better ask)
July 11th, 2008 at 2:09 pm
Not much of unix guy/admin, but on my home setup it seems to be working fine, even after rebooting the machine.
Thanks!
July 11th, 2008 at 2:24 pm
Thanks for the reports!
A.D.: Read the post. “This is for 1.2-release systems only, those using 1.2.1 or 1.3 snapshots can update by installing a new full update from the snapshot server.”
July 11th, 2008 at 3:26 pm
Commands do not work via SSH and Console on 1.2 embedded
PFbox:~# killall dnsmasq
PFbox:~# mv /usr/local/sbin/dnsmasq /root/
mv: rename /usr/local/sbin/dnsmasq to /root/dnsmasq: Read-only file system
Confirmed working via WebGUI Command 1.2 embedded
Jul 11 15:16:33 dnsmasq[4339]: started, version 2.43rc3 cachesize 150
Jul 11 15:16:33 dnsmasq[4339]: compile time options: IPv6 GNU-getopt BSD-bridge ISC-leasefile no-DBus no-I18N TFTP
Jul 11 15:16:33 dnsmasq[4339]: reading /etc/resolv.conf
Jul 11 15:16:33 dnsmasq[4339]: using nameserver x.x.x.x#53
Jul 11 15:16:33 dnsmasq[4339]: using nameserver x.x.x.x#53
Jul 11 15:16:33 dnsmasq[4339]: read /etc/hosts – 2 addresses
July 11th, 2008 at 3:51 pm
For embedded, you first need to run:
/etc/rc.conf_mount_rw
and when done:
/etc/rc.conf_mount_ro
July 11th, 2008 at 6:09 pm
Remember to use the ip and not the domain name for the WebGUI / Diagnostics -> Command, cause you gonna kill the DNS server during the procedure.
July 11th, 2008 at 7:06 pm
For DNS Resloving in the shell i believe it uses /etc/resolv.conf and asks the DNS servers directly. I killed dnsmasq and was able to ping domain names from the shell all day long. I also did the update with the domain name and it worked fine.
Using the ip can’t hurt
July 11th, 2008 at 8:00 pm
Fetching the updated file isn’t relevant to whether or not dnsmasq is running, since the local system uses /etc/resolv.conf.
I think ronpfs means don’t access the webGUI by hostname if your client is using that system for its DNS. That shouldn’t matter either as the DNS cache on your client system should be more than long enough to accommodate doing this, but it’s not bad advice.
July 11th, 2008 at 8:12 pm
Working great on 1.2 stable here!
July 12th, 2008 at 12:44 pm
Chris said “don’t access the webGUI by hostname if your client is using that system for its DNS.”
That is exactly what I meant ;o) Not a big thing cause once your client can’t resolve the hostname a few synaps fire and you switch to IP ;o)
Working ok here too
July 22nd, 2008 at 10:23 pm
[...] own DNS server and haven’t patched yet – now would be the time to do so. The details of the previously mentioned vulnerability were inadvertently made publicly available earlier [...]