BSD TCP/IP广播地址连接检查漏洞

漏洞信息详情

BSD TCP/IP广播地址连接检查漏洞

漏洞简介

多个BSD操作系统的TCP/IP实现存在错误,包括FreeBSD和NetBSD,OpenBSD可能也有此问题。
RFC 1122定义的TCP实现对于进入的SYN分段的地址是去向多播或广播地址的必需丢弃不作任何反应。受影响的BSD在实现上是基于链路层地址丢弃包而不是检查目标IP地址。

漏洞公告

临时解决方法:
如果您不能立刻安装补丁或者升级,CNNVD建议您采取以下措施以降低威胁:

* 不打补丁实在没有好的临时解决方法。
厂商补丁:
FreeBSD
——-
2002-2-25 (CVS revision 1.148) FreeBSD 5-CURRENT和2002-2-28 (revision 1.107.2.21) FreeBSD 4-STABLE修复了这个安全问题,请到厂商的主页下载:

http://www.freebsd.org/” target=”_blank”>
http://www.freebsd.org/
NetBSD
——
NetBSD补丁 (已经测试):

Index: src/sys/netinet/tcp_input.c

===================================================================

RCS file: /export/netbsd/ncvs/syssrc/sys/netinet/tcp_input.c,v

retrieving revision 1.108.4.10

diff -u -r1.108.4.10 tcp_input.c

— src/sys/netinet/tcp_input.c 24 Jan 2002 22:44:21 -0000 1.108.4.10

+++ src/sys/netinet/tcp_input.c 16 Mar 2002 23:14:14 -0000

@@ -677,7 +677,8 @@

* Make sure destination address is not multicast.

* Source address checked in ip_input().

*/

– if (IN_MULTICAST(ip->ip_dst.s_addr)) {

+ if (IN_MULTICAST(ip->ip_dst.s_addr) ||

+ in_broadcast(ip->ip_dst, m->m_pkthdr.rcvif)) {

/* XXX stat */

goto drop;

}

@@ -2183,6 +2184,11 @@

*/

if (tiflags & TH_RST)

goto drop;

+

+ if (IN_MULTICAST(ip->ip_dst.s_addr) ||

+ in_broadcast(ip->ip_dst, m->m_pkthdr.rcvif))

+ goto drop;

+

{

/*

* need to recover version # field, which was overwritten on
OpenBSD
——-
OpenBSD补丁 (没有测试):

Index: src/sys/netinet/tcp_input.c

===================================================================

RCS file: /export/openbsd/ncvs/src/sys/netinet/tcp_input.c,v

retrieving revision 1.109

diff -u -r1.109 tcp_input.c

— src/sys/netinet/tcp_input.c 15 Mar 2002 18:19:52 -0000 1.109

+++ src/sys/netinet/tcp_input.c 17 Mar 2002 01:08:35 -0000

@@ -1080,8 +1080,6 @@

/*

* RFC1122 4.2.3.10, p. 104: discard bcast/mcast SYN

– * in_broadcast() should never return true on a received

– * packet with M_BCAST not set.

*/

if (m->m_flags & (M_BCAST|M_MCAST))

goto drop;

@@ -1094,7 +1092,8 @@

break;

#endif /* INET6 */

case AF_INET:

– if (IN_MULTICAST(ip->ip_dst.s_addr))

+ if (IN_MULTICAST(ip->ip_dst.s_addr) ||

+ in_broadcast(ip->ip_dst, m->m_pkthdr.rcvif)) {

goto drop;

break;

}

@@ -2139,7 +2138,8 @@

break;

#endif /* INET6 */

case AF_INET:

– if (IN_MULTICAST(ip->ip_dst.s_addr))

+ if (IN_MULTICAST(ip->ip_dst.s_addr) ||

+ in_broadcast(ip->ip_dst, m->m_pkthdr.rcvif))

goto drop;

}

if (tiflags & TH_ACK) {

参考网址

来源: www.FreeBSD.org
链接:http://www.FreeBSD.org/cgi/query-pr.cgi?pr=35022

来源: BUGTRAQ
名称: 20020317 TCP Connections to a Broadcast Address on BSD-Based Systems
链接:http://online.securityfocus.com/archive/1/262733

来源: BID
名称: 4309
链接:http://www.securityfocus.com/bid/4309

来源: OSVDB
名称: 5308
链接:http://www.osvdb.org/5308

来源: www.openbsd.org
链接:http://www.openbsd.org/cgi-bin/cvsweb/src/sys/netinet/tcp_input.c.diff?r1=1.109&r2=1.110

来源: XF
名称: bsd-broadcast-address(8485)
链接:http://www.iss.net/security_center/static/8485.php

来源: cvsweb.netbsd.org
链接:http://cvsweb.netbsd.org/bsdweb.cgi/syssrc/sys/netinet/tcp_input.c.diff?r1=1.136&r2=1.137

来源: SGI
名称: 20030604-01-I
链接:ftp://patches.sgi.com/support/free/security/advisories/20030604-01-I

受影响实体

© 版权声明
THE END
喜欢就支持一下吧
点赞0 分享