Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Jan 1999 23:57:52 +0100 (CET)
From:      loyer@ensta.fr
To:        FreeBSD-gnats-submit@FreeBSD.ORG
Subject:   bin/9403: ppp exit on signal 11 by PPP because alias.log not opened
Message-ID:  <199901082257.XAA18447@quickstep.ensta.fr>

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

>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 <a_label>" arguments.

Send a packet which trigger the dial and aliasing process
(telnet <an_Internet_addr>)

>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



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