NetBSD Problem Report #367
From gnats Tue Jul 26 22:29:40 1994
Received: from amiga.oscs.montana.edu (amiga.oscs.montana.edu [153.90.3.128]) by sun-lamp.cs.berkeley.edu (8.6.9/8.6.9) with ESMTP id WAA12173 for <gnats-bugs@sun-lamp.cs.berkeley.edu>; Tue, 26 Jul 1994 22:29:15 -0700
Message-Id: <199407262326.XAA00285@amiga.oscs.montana.edu>
Date: Tue, 26 Jul 1994 23:26:30 GMT
From: osymh@gemini.oscs.montana.edu
Reply-To: osymh@gemini.oscs.montana.edu
To: gnats-bugs@sun-lamp.cs.berkeley.edu
Subject: if_ppp.c doesn't allocate enough mbufs for input packets
X-Send-Pr-Version: 3.2
>Number: 367
>Category: kern
>Synopsis: pppgetm() only allocates one mbuf for input packets
>Confidential: no
>Severity: critical
>Priority: high
>Responsible: gnats-admin
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Jul 26 22:35:06 +0000 1994
>Closed-Date: Wed Jul 27 09:04:26 +0000 1994
>Last-Modified:
>Originator: Michael Hitch
>Release: NetBSD 1.0_BETA July 25
>Organization:
Montana State University
>Environment:
System: NetBSD amiga.oscs.montana.edu 1.0_BETA NetBSD 1.0_BETA (ZEUS) #940725.5: Tue Jul 26 22:27:47 1994 root@amiga.oscs.montana.edu:/opt/sys/arch/amiga/compile/ZEUS amiga
Architecture: amiga
>Description:
When if_ppp.c allocates mbufs, the pppgetm() routine only allocates
a single mbuf. If a packet is received that won't fit in a single
mbuf, the attempt to allocate space for the packet will fail and the
packet will be dropped.
The problem is that pppgetm() sets up the pointer to the first mbuf,
but never advances the pointer for the additional mbuf(s), but does
account for the non-allocated mbuf(s). As a result, only one mbuf
is allocated when more than one is required, but no error is returned.
>How-To-Repeat:
Telnet or rlogin from NetBSD to another system and run something
that outputs any large amount of data, enough so that the ppp packet
length will be larger that one mbuf can hold. The telnet/rlogin
session will then hang because the packet is thrown away. [This
requires that the MTU of the ppp link is larger than 1 mbuf.]
>Fix:
This patch fixes pppgetm() to update the pointer to next mbuf as
it traverses the mbuf chain.
*** /mnt/src/sys/net/if_ppp.c Thu Jul 21 22:18:05 1994
--- /opt/sys/net/if_ppp.c Tue Jul 26 23:02:34 1994
***************
*** 1030,1035 ****
--- 1030,1036 ----
MCLGET(m, M_DONTWAIT);
}
len -= M_DATASIZE(m);
+ mp = &m->m_next;
}
splx(s);
return len <= 0;
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed
State-Changed-By: deraadt
State-Changed-When: Wed Jul 27 02:04:26 PDT 1994
State-Changed-Why:
as paulus says:
Mea culpa, mea culpissima. Life is crazy here too.
The patch is right - can you put it in, please?
>Unformatted:
(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.