NetBSD Problem Report #8371
Received: (qmail 16596 invoked from network); 11 Sep 1999 01:19:47 -0000
Message-Id: <199909110119.KAA22801@rerun.tenjin.org>
Date: Sat, 11 Sep 1999 10:19:37 +0900 (JST)
From: kawamoto@tenjin.org
Reply-To: kawamoto@tenjin.org
To: gnats-bugs@gnats.netbsd.org
Subject: a free'd ndbm memory reference in the qpopper's APOP code
X-Send-Pr-Version: 3.95
>Number: 8371
>Category: pkg
>Synopsis: a free'd ndbm memory reference in the qpopper's APOP code
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: pkg-manager
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Sep 10 18:20:00 +0000 1999
>Closed-Date: Wed Sep 15 21:39:49 +0000 1999
>Last-Modified: Wed Sep 15 21:40:25 +0000 1999
>Originator: Kawamoto Yosihisa
>Release: 1999/9/9
>Organization:
tenjin.org
>Environment:
note pc(SONY VAIO PCG-505RX)
System: NetBSD rerun.tenjin.org 1.4K NetBSD 1.4K (RERUN) #216: Wed Sep 8 20:51:08 JST 1999 kawamoto@rerun.tenjin.org:/usr/src/sys/arch/i386/compile/RERUN i386
>Description:
In the package qpopper-2.53, there may be a free'd memory
reference in an APOP code.
The dbm_fetch'ed string is unavailable after dbm_close.
so APOP authorizations are always failed with a false string.
>How-To-Repeat:
Just install the qpopper-2.53 package and use an APOP
authentication.
>Fix:
Apply a following patch. This code is safe because the
function obscure() duplicates a argument string before dbm_close.
--- pop_apop.c- Fri Jul 10 08:44:07 1998
+++ pop_apop.c Sat Sep 11 09:09:30 1999
@@ -178,6 +178,8 @@
dbm_close (db);
#endif
return(pop_auth_fail(p, POP_FAILURE, "not authorized"));
+ } else {
+ ddatum.dptr = obscure(ddatum.dptr);
}
#ifdef GDBM
@@ -189,7 +191,7 @@
MD5Init(&mdContext);
MD5Update(&mdContext, (unsigned char *)p->md5str, strlen(p->md5str));
- MD5Update(&mdContext, (unsigned char *)obscure(ddatum.dptr), (ddatum.dsize - 1));
+ MD5Update(&mdContext, (unsigned char *)ddatum.dptr, (ddatum.dsize - 1));
MD5Final(digest, &mdContext);
cp = buffer;
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed
State-Changed-By: tron
State-Changed-When: Wed Sep 15 14:39:49 PDT 1999
State-Changed-Why:
Patch applied, thanks.
>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.