From owner-freebsd-bugs Sat Jan 9 01:50:08 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id BAA05649 for freebsd-bugs-outgoing; Sat, 9 Jan 1999 01:50:08 -0800 (PST) (envelope-from owner-freebsd-bugs@FreeBSD.ORG) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id BAA05639 for ; Sat, 9 Jan 1999 01:50:06 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.8.8/8.8.5) id BAA10280; Sat, 9 Jan 1999 01:50:01 -0800 (PST) Received: from ensta.ensta.fr (ensta.ensta.fr [147.250.1.1]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id BAA05289 for ; Sat, 9 Jan 1999 01:47:31 -0800 (PST) (envelope-from loyer@quickstep.ensta.fr) Received: from quickstep.ensta.fr (quickstep.ensta.fr [147.250.61.100]) by ensta.ensta.fr (8.8.5/8.8.5) with ESMTP id KAA29867 for ; Sat, 9 Jan 1999 10:46:58 +0100 (MET) Received: (from loyer@localhost) by quickstep.ensta.fr (8.9.1/8.8.5) id XAA18447; Fri, 8 Jan 1999 23:57:52 +0100 (CET) Message-Id: <199901082257.XAA18447@quickstep.ensta.fr> Date: Fri, 8 Jan 1999 23:57:52 +0100 (CET) From: loyer@ensta.fr Reply-To: loyer@ensta.fr To: FreeBSD-gnats-submit@FreeBSD.ORG X-Send-Pr-Version: 3.2 Subject: bin/9403: ppp exit on signal 11 by PPP because alias.log not opened Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 9403 >Category: bin >Synopsis: ppp exit on signal 11 by PPP because alias.log not opened >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Jan 9 01:50:00 PST 1999 >Closed-Date: >Last-Modified: >Originator: Frederic LOYER >Release: FreeBSD 3.0-RELEASE i386 >Organization: ENSTA >Environment: This bug is caused by PPP launched by non-root user with folowing options: alias enable yes alias log yes >Description: ppp exit on signal 11 when trying to log aliasing activities but the /var/log/alias.log file couln't be opened. Adding some "printf" in alias_bd.c show that when InitPacketAliasLog doesn't manage to open /var/log/alias.log, it doesn't set the PKT_ALIAS_LOG bit, but the caller (PacketAliasSetMode) does. Afterward, ShowAliasStats() will try to use the monitorFile FILE pointer with fprintf and cause a segmentation fault since monitorFile==NULL. >How-To-Repeat: Setting ppp with `alias enable yes' and `alias log yes' options. Running it by an allowed non root user, with "-auto " arguments. Send a packet which trigger the dial and aliasing process (telnet ) >Fix: In /usr/src/lib/libalias, modifying alias_db.c with the following patch. NB: The same shouldn't be made with NO_FW_PUNCH (InitPunchFW doesn't touch packetAliasMode). *** alias_db.c.orig Fri Jan 8 23:30:13 1999 --- alias_db.c Fri Jan 8 23:33:21 1999 *************** *** 2036,2041 **** --- 2036,2042 ---- if (~flags & mask & PKT_ALIAS_LOG) { UninitPacketAliasLog(); } + mask &= ~PKT_ALIAS_LOG; #ifndef NO_FW_PUNCH /* Start punching holes in the firewall? */ >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message