Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 Mar 2009 19:37:12 GMT
From:      Yoshitaka AHAREN <yaharen@gm.dns-lab.jp>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   amd64/132911: ip6fw: argument type of fill_icmptypes is wrong and causes problem on amd64 platform
Message-ID:  <200903211937.n2LJbCeJ077887@www.freebsd.org>
Resent-Message-ID: <200903211940.n2LJe1wV077264@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         132911
>Category:       amd64
>Synopsis:       ip6fw: argument type of fill_icmptypes is wrong and causes problem on amd64 platform
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-amd64
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Mar 21 19:40:00 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Yoshitaka AHAREN
>Release:        FreeBSD 6.4-RELEASE-p3
>Organization:
College of Information Science, University of Tsukuba
>Environment:
FreeBSD freebsd.local 6.4-RELEASE-p3 FreeBSD 6.4-RELEASE-p3 #16: Fri Jan 23 14:46:52 JST 2009     root@freebsd.local:/usr/obj/usr/src/sys/MyKernel  amd64
>Description:
fill_icmptypes in usr/src/sbin/ip6fw/ip6fw.c takes wrong type of argument 'types'. It is defined as array of 'unsgined' in /usr/include/netinet6/ip6_fw.h, but in the prototype of fill_icmptypes it is defined as array of 'u_long'. In amd64 platform, u_long != unsigned. It causes wrong icmp types to pass to ip6fw kernel module.
>How-To-Repeat:
run the following command in amd64 platform:
# ip6fw add 10 allow ipv6-icmp from any to any icmptypes 63
00010 allow ipv6-icmp from any to any icmptype 95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127

>Fix:
Apply attached patch.

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200903211937.n2LJbCeJ077887>