Subject: bin/2700: route bug
To: None <gnats-bugs@NetBSD.ORG>
From: Geoff Wing <mason@primenet.com.au>
List: netbsd-bugs
Date: 08/15/1996 21:31:40
>Number:         2700
>Category:       bin
>Synopsis:       /sbin/route not checking args properly
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Aug 15 07:50:05 1996
>Last-Modified:
>Originator:     Geoff Wing
>Organization:
Geoff Wing [mason@primenet.com.au]   PrimeNet - Internet Consultancy
  Web: http://www.primenet.com.au/   Facsimile: +61-3-9819 3788
>Release:        1.2_ALPHA
>Environment:
	
System: NetBSD coral.primenet.com.au 1.2_BETA NetBSD 1.2_BETA (CORAL) #37: Wed Aug 14 10:35:28 EST 1996 mason@coral.primenet.com.au:/usr/src/sys/arch/i386/compile/CORAL i386


>Description:
	around line 590 (in Apr 16 version),
	  ``case K_IFA'' lines and onwards.
	    *++argv  is passed to getaddr() without checking its validity.
	
>How-To-Repeat:
	/sbin/route add 1.2.3.4 -ifp
>Fix:
	checks like the following might be better (or a better usage?)
	    if (--argc)
	        (void) getaddr(RTA_IFA, *++argv, 0);
	    else
	        usage();
>Audit-Trail:
>Unformatted: