From owner-freebsd-bugs Tue Sep 7 16: 0:30 1999 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 04AD015403 for ; Tue, 7 Sep 1999 16:00:25 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id QAA26606; Tue, 7 Sep 1999 16:00:02 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from esmeralda.xaa.iae.nl (esmeralda.xaa.iae.nl [194.151.75.9]) by hub.freebsd.org (Postfix) with ESMTP id 1948514EE2 for ; Tue, 7 Sep 1999 15:57:32 -0700 (PDT) (envelope-from xaa@xaa.iae.nl) Received: from ariel.xaa.iae.nl (ariel.xaa.iae.nl [194.151.75.10]) by esmeralda.xaa.iae.nl (Postfix) with ESMTP id 964B6BA1C for ; Wed, 8 Sep 1999 00:55:46 +0200 (MET DST) Received: by ariel.xaa.iae.nl (Postfix, from userid 1002) id 0895F1F4F; Wed, 8 Sep 1999 00:55:45 +0200 (CEST) Message-Id: <19990907225545.0895F1F4F@ariel.xaa.iae.nl> Date: Wed, 8 Sep 1999 00:55:45 +0200 (CEST) From: xaa@xaa.iae.nl Reply-To: xaa@xaa.iae.nl To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: bin/13628: inet_aton accepts too much Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 13628 >Category: bin >Synopsis: inet_aton doesn't check valid addresses well enough >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Sep 7 16:00:02 PDT 1999 >Closed-Date: >Last-Modified: >Originator: Mark Huizer >Release: FreeBSD 4.0-CURRENT i386 >Organization: >Environment: 4.0-current >Description: inet_aton should return 0 on invalid IP addresses. 1000.0.0.0 is an invalid address but inet_aton will kindly return 1000*(1<<24) and 1 for a successful translation >How-To-Repeat: if (!inet_aton("1000.0.0.0",&sockaddress)) { fprintf(stderr,"invalid address\n"); } else fprintf(stderr,"valid address??\n"); >Fix: check the parts more carefully. haven't checked linux' code yet, but that correctly returns a 0 for invalid addresses >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message