NetBSD Problem Report #10921
Received: (qmail 24499 invoked by uid 1176); 31 Aug 2000 08:25:38 -0000
Message-Id: <20000831082538.24498.qmail@mail.netbsd.org>
Date: 31 Aug 2000 08:25:38 -0000
From: itojun@netbsd.org
Reply-To: itojun@netbsd.org
To: gnats-bugs@gnats.netbsd.org
Subject: openssl should XX_LONG types to u_int32_t, not unsigned long
X-Send-Pr-Version: 3.95
>Number: 10921
>Category: lib
>Synopsis: openssl build should XX_LONG types to u_int32_t, not unsigned long
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: itojun
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Aug 31 08:26:01 +0000 2000
>Closed-Date: Sat Oct 07 01:28:38 +0000 2000
>Last-Modified: Sat Oct 07 01:28:38 +0000 2000
>Originator: Jun-ichiro itojun Hagino
>Release: almost latest current (like 20000828)
>Organization:
itojun.org
>Environment:
NetBSD up1000 1.5E NetBSD 1.5E (UP1000) #18: Thu Aug 31 16:29:51 JST 2000 itojun@up1000:/export/up1000/home/itojun/NetBSD/src/sys/arch/alpha/compile/UP1000 alpha
>Description:
in crypto/dist/openssl, there are definitions like:
(sample: crypto/dist/openssl/crypto/bf/blowfish.h)
#define BF_LONG unsigned long
there are tons of #ifdef to determine the type to be used.
those XX_LONG types are not really meant to be "unsigned long",
they are assumed to be "unsigned 32bit integer".
if we compile the code on top of alpha (or other 64bit arch),
and if "unsigned long" is picked, the resulting code will not be
usable for realworld crypto application which tries to encrypt
bytestream on the memory.
these #ifdef can also lead to hard-to-track build failure for
third-party applications, as these headers will be installed into
/usr/include/openssl. userland program can #define any random symbols,
and those random symbols can affect the declaration of XX_LONG.
if the declaration of XX_LONG mismatches between libcrypto and
application, any random failure can happen.
>How-To-Repeat:
>Fix:
modify all openssl header files, and remove unnecessary #defines.
if unsigned 32bit integer is required, use u_int32_t.
use "#ifdef __alpha__" or "#if ALIGNBYTES > 1" when we need
to determine alignment constraints and other things.
(see the latest sys/crypto)
>Release-Note:
>Audit-Trail:
From: itojun@iijlab.net
To: Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: lib/10921: openssl should XX_LONG types to u_int32_t, not unsigned long
Date: Thu, 31 Aug 2000 18:20:27 +0900
>>Synopsis: openssl build should XX_LONG types to u_int32_t, not unsigned long
the change should come with shlib major for libcrypto,
due to ABI change.
itojun
Responsible-Changed-From-To: lib-bug-people->itojun
Responsible-Changed-By: itojun
Responsible-Changed-When: Tue Sep 12 19:39:54 PDT 2000
Responsible-Changed-Why:
i'm trying to look at it
State-Changed-From-To: open->feedback
State-Changed-By: itojun
State-Changed-When: Fri Sep 29 17:25:29 PDT 2000
State-Changed-Why:
committed to main trunc. u_int32_t is used everywhere. did not raise
version # as it does not impose ABI change for 32bit arch and it was broken
for non-32bit.
State-Changed-From-To: feedback->closed
State-Changed-By: itojun
State-Changed-When: Fri Oct 6 18:28:27 PDT 2000
State-Changed-Why:
pulled up to 1.5.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.49 2026/05/14 01:52:41 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.