NetBSD Problem Report #319

From gnats  Sat Jul  2 21:41:14 1994
Received: from inet-gw-2.pa.dec.com (inet-gw-2.pa.dec.com [16.1.0.23]) by sun-lamp.cs.berkeley.edu (8.6.9/8.6.9) with SMTP id VAA01276 for <gnats-bugs@sun-lamp.cs.berkeley.edu>; Sat, 2 Jul 1994 21:41:13 -0700
Message-Id: <199407030325.EAA00454@wildcat.demon.co.uk>
Date: Sun, 3 Jul 1994 04:25:59 +0100
From: Alasdair Baird <alasdair@wildcat.demon.co.uk>
Reply-To: alasdair@wildcat.demon.co.uk
To: gnats-bugs%sun-lamp.cs.berkeley.edu@gatekeeper.dec.com
Subject: bug in if_ppp.c
X-Send-Pr-Version: 3.2

>Number:         319
>Category:       kern
>Synopsis:       if_ppp.c causes machine to crash
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    gnats-admin
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jul 02 21:50:07 +0000 1994
>Closed-Date:    Thu Jul 07 21:21:18 +0000 1994
>Last-Modified:  Mon Jan 19 19:01:00 +0000 2004
>Originator:     Alasdair Baird
>Release:        current as of July 2nd
>Organization:
absolutely none whatsoever
>Environment:
System: NetBSD wildcat.demon.co.uk 0.9C NetBSD 0.9C (WILDCAT) #14: Sun Jul 3 03:40:45 BST 1994 alasdair@wildcat.demon.co.uk:/usr/src/sys/arch/i386/compile/WILDCAT i386


>Description:
	On starting a ppp connection the machine crashes in pppfcs()
	while calculating a checksum; the crash is due to pppfcs()
	being passed an invalid length field for data in an mbuf.

	The mbuf is initially allocated by calling MGET() in the
	pppoutput() routine.  Subsequently a call will be made to
	M_TRAILINGSPACE(); now if the outgoing data is small enough
	to fit in the initial mbuf (i.e. no call to MCLGET() need be
	made) the M_TRAILINGSPACE() macro will attempt to use the
	m_len field of the mbuf.  Unfortunately this field is not
	initialised in MGET() so some quite arbitrary result gets
	returned and eventually used to initialise the m_len field.
	Subsequently pppoutput() calls pppasyncstart() which calls
	pppstart() which in turn calls pppfcs() to checksum the data
	in the mbuf.  Though the data is correct the length field is
	wholly bogus and will at some point cause a nasty vm_fault as
	a pointer runs off into never never land.
>How-To-Repeat:
	Start up a ppp connection and try sending some packets.
>Fix:
	There are I guess two ways to fix this problem, one being to
	patch the MGET() macro to initialise the m_len field to zero,
	and the other being to initialise it in the if_ppp.c code as
	needed.  I've chosen to do the latter as I have no proof that
	this is a problem in any other part of the code.  The context
	diff for this change is as follows:


*** if_ppp.c.old	Wed Jun 29 11:30:27 1994
--- if_ppp.c	Sun Jul  3 03:39:56 1994
***************
*** 423,428 ****
--- 423,429 ----
  	    m_freem(m0);
  	    return (ENOBUFS);
  	}
+ 	m->m_len = 0;
  	if (uio->uio_resid >= MCLBYTES / 2)
  	    MCLGET(m, M_DONTWAIT);
  	len = M_TRAILINGSPACE(m);


	This fix certainly seems to work, otherwise this mail message
	would never have arrived.

	   Alasdair.
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: deraadt 
State-Changed-When: Thu Jul 7 14:21:18 PDT 1994 
State-Changed-Why:  
bug was fixed, if_ppp.c should not have assumed an mbuf's m_len 
field is initialized (it is not) by MGET() 

From: Thomas Klausner <wiz@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:  
Subject: pr/319 CVS commit: pkgsrc/devel/automake
Date: Mon, 19 Jan 2004 19:00:20 +0000 (UTC)

 Module Name:	pkgsrc
 Committed By:	wiz
 Date:		Mon Jan 19 19:00:20 UTC 2004

 Modified Files:
 	pkgsrc/devel/automake: Makefile distinfo

 Log Message:
 Update to 1.8.2.

 Bug fixed in 1.8.2:

 * A (well known) portability bug slipped in the changes made to
   install-sh in Automake 1.8.1.  The broken install-sh would refuse to
   install anything on Tru64.

 * Fix install rules for conditionally built python files.  (This never
   really worked.)

 Bug fixed in 1.8.1:

 * Bugs introduced by 1.8:

   - Fix Config.pm import error with old Perl versions (at least
     5.005_03).  One symptom is that aclocal could not find its macro
     directory.

   - Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
     created by `make install' are always world readable, even if the
     installer happens to have an overly restrictive umask (e.g. 077).
     This was a mistake and has been reverted.  There are at least two
     reasons why we must not use `-m 0755':
       - it causes special bits like SGID to be ignored,
       - it may be too restrictive (some setups expect 775 directories).

   - Fix aclocal to honor definitions located in files which have been
     m4_included manually.  aclocal 1.8 had been updated to check
     m4_included files for new requirements, but forgot that these
     m4_included files can also provide new definitions.

     Note that if you have such a setup, we recommend you get rid of
     it.  In the past, there was a reason to m4_include files manually:
     aclocal used to duplicate entire M4 files into aclocal.m4, even
     files that were distributed.  Some packages were therefore
     m4_including the distributed file directly, and playing some
     tricks to ensure aclocal would not copy that file to aclocal.m4,
     in order to limit the amount of duplication.  Since aclocal 1.8.x
     will precisely output m4_includes for local M4 files, we recommend
     that you clean up your setup, removing all manual m4_includes and
     letting aclocal output them.

   - Output detailed menus in the Info version if the Automake manual,
     so that Emacs can locate the indexes.

   - configure.ac and configure were listed twice in DIST_COMMON (an
     internal variable where Automake lists configury files to
     distribute).  This was harmless, but unaesthetic.

   - Use `chmod a-w' instead of `chmod -w' as the latter honors umask.
     This was an issue only in the Automake package itself, not in
     its output.

   - Automake assumed that all AC_CONFIG_LINKS arguments had the form
     DEST:SRC.  This was wrong, as some packages do
     AC_CONFIG_LINKS($computedlinks).  This version no longer abort in
     that situation.

   - Contrary to mkinstalldirs, $(mkdir_p) was expecting exactly one
     argument.  This caused two kinds of failures:
       - Rules installing data in a conditionally defined directory
         failed when that directory was undefined.  In this case no
         argument was supplied.
       - `make installdirs' failed, because several directories were
         passed to $(mkdir_p).  This was an issue only on platform
         were $(mkdir_p) is implemented with `install-sh -d'.
     $(mkdir_p) as been changed to accept 0 or more arguments, as
     mkinstalldirs did.

 * Long-standing bugs:

   - Fix an unexpected diagnostic occurring when users attempt
     to override some internal variables that Automake appends to.

   - aclocal now scans configure.ac for macro definitions (PR/319).

   - Fix a portability issue with OSF1/Tru64 Make.  If a directory
     distributes files which are outside itself (this usually occurs
     when using AC_CONFIG_AUX_DIR([../dir]) to use auxiliary files
     from a parent package), then `make distcheck' fails due to an
     optimization performed by OSF1/Tru64 Make in its VPATH handling.
     (tests/subpkg2.test failure)

   - Fix another portability issue with Sun and OSF1/Tru64 Make.
     In a VPATH-build configuration, `make install' would install
     nobase_ files to wrong locations.

   - Fix a Perl `uninitialized value' diagnostic occurring when
     automake complains that a Texinfo file does not have a
     @setfilename statement.

   - Erase config.status.lineno during `make distclean'.  This file
     can be created by config.status.  Automake already knew about
     configure.lineno, but forgot config.status.lineno.

   - Distribute all files, even those which are built and installed
     conditionally.  This change affects files listed in conditionally
     defined *_HEADERS and *_PYTHON variable (unless they are nodist_*)
     as well as those listed in conditionally defined dist_*_DATA,
     dist_*_JAVA, dist_*_LISP, and dist_*_SCRIPTS variables.

   - Fix AM_PATH_LISPDIR to avoid \? in sed regular expressions; it
     doesn't conform to POSIX.

   - Normalize help strings for configure variables and options added
     by Automake macros.

 * Anticipation:

   - Check for python2.4 in AM_PATH_PYTHON.

 * Spurious failures in test suite:

   - tests/libtool5.test, tests/ltcond.test, tests/ltcond2.test,
     tests/ltconv.test: fix failures with CVS Libtool.
   - tests/aclocal6.test: fix failure if autom4te.cache is disabled.
   - tests/txinfo24.test, tests/txinfo25.test, tests/txinfo28.test:
     fix failures with old Texinfo versions.


 To generate a diff of this commit:
 cvs rdiff -r1.44 -r1.45 pkgsrc/devel/automake/Makefile
 cvs rdiff -r1.15 -r1.16 pkgsrc/devel/automake/distinfo

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.