From owner-freebsd-bugs Thu Aug 3 6: 0:13 2000 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 139D737B86E for ; Thu, 3 Aug 2000 06:00:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id GAA69616; Thu, 3 Aug 2000 06:00:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from mx2.ulstu.ru (ns.ulstu.ru [62.76.34.36]) by hub.freebsd.org (Postfix) with ESMTP id 50AB737B663 for ; Thu, 3 Aug 2000 05:56:43 -0700 (PDT) (envelope-from vss@mx2.ulstu.ru) Received: (from vss@localhost) by mx2.ulstu.ru (8.9.3-mfd/8.9.3) id QAA02937; Thu, 3 Aug 2000 16:41:18 +0400 (MSD) Message-Id: <200008031241.QAA02937@mx2.ulstu.ru> Date: Thu, 3 Aug 2000 16:41:18 +0400 (MSD) From: Vlad Skvortsov Reply-To: vss@ulstu.ru To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: bin/20381: portmapper incorrectly checks interfaces with aliases Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 20381 >Category: bin >Synopsis: portmapper incorrectly checks interfaces with aliases >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Aug 03 06:00:00 PDT 2000 >Closed-Date: >Last-Modified: >Originator: Vlad Skvortsov >Release: FreeBSD 3.4-STABLE i386 >Organization: Ulyanovsk State Technical Universoty >Environment: There is aliased address on lo0 interface (in addition to 127.0.0.1). >Description: /usr/sbin/portmap treats aliased ip addresses on interfaces as non-local thus refusing local daemons to register (for example, mountd). Function find_local() cycles through all interfaces and collects addresses associated with them. Though it only gets one (first) address from each interface. In case when lo0 has aliased ip besides 127.0.0.1, the latter may be not the first associated with lo0 in the list returned by sysctl(NET_RT_IFLIST). That way the aliased ip will be further treated as local and 127.0.0.1 as non-local. >How-To-Repeat: # iconfig lo0 1.2.3.4 netmask 0xfffffff alias # killall -9 portmap # portmap -v # mountd After this portmapper claims to syslog that request from mountd has come not from local address. >Fix: Check if the interface has aliased ip addresses and in that case copy them all to internal local addresses array. >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message