linux – getaddrinfo()的Glibc bug缓解
今天流过
exploit for glibc,涉及到getaddrinfo()调用DNS解析.我正在面向互联网的两个Bind9盒子上运行Ubuntu 12.04.我不确定我完全理解这个漏洞,但它似乎是由一个恶意DNS服务器的大量回复引起的.其中一个缓解措施是“防火墙丢弃UDP DNS数据包> 512字节”,因此我在DNS服务器上配置netfilter以丢弃任何UDP>来自或去往端口53的512字节:
-A INPUT -i lo -j ACCEPT 使用Bind设置或其他任何东西有更好的方法吗? 每个回复更新: -A INPUT -i lo -j ACCEPT 和/etc/bind/named.conf.options options { ... // 2016-02-17 - tmb - glibc exploit mitigation edns-udp-size 900 ; max-udp-size 900 ; }; 更新2: 解决方法
如果您在本地运行绑定,则会为您提供测试:
dig @127.0.0.1 tcf.rs.dns-oarc.net txt 如下所述:https://www.dns-oarc.net/oarc/services/replysizetest. 你会得到这样的回复: root@myhost:~# dig @127.0.0.1 tcf.rs.dns-oarc.net txt ; <<>> DiG <<>> @127.0.0.1 tcf.rs.dns-oarc.net txt ; (1 server found) ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY,status: NOERROR,id: 61575 ;; flags: qr rd ra; QUERY: 1,ANSWER: 5,AUTHORITY: 26,ADDITIONAL: 27 ;; OPT PSEUDOSECTION: ; EDNS: version: 0,flags:; udp: 1024 ;; QUESTION SECTION: ;tcf.rs.dns-oarc.net. IN TXT ;; ANSWER SECTION: tcf.rs.dns-oarc.net. 60 IN CNAME tcf.x981.rs.dns-oarc.net. tcf.x981.rs.dns-oarc.net. 59 IN CNAME tcf.x986.x981.rs.dns-oarc.net. tcf.x986.x981.rs.dns-oarc.net. 58 IN CNAME tcf.x991.x986.x981.rs.dns-oarc.net. tcf.x991.x986.x981.rs.dns-oarc.net. 57 IN TXT "Tested at 2016-02-17 15:44:36 UTC" tcf.x991.x986.x981.rs.dns-oarc.net. 57 IN TXT "xx.xx.xx.xx DNS reply size limit is at least 991" 并且您可以添加绑定选项 options { ... edns-udp-size 1024 ; max-udp-size 1024 ; }; 在named.conf文件中 如下所述:https://labs.ripe.net/Members/anandb/content-testing-your-resolver-dns-reply-size-issues. 我也会将此与其他缓解措施结合使用. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |