NetBSD Problem Report #47832
From mark@ecs.vuw.ac.nz Sat May 18 05:21:34 2013
Return-Path: <mark@ecs.vuw.ac.nz>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
by www.NetBSD.org (Postfix) with ESMTP id 96FFB63ECD7
for <gnats-bugs@gnats.NetBSD.org>; Sat, 18 May 2013 05:21:34 +0000 (UTC)
Message-Id: <201305180517.r4I5HrQY002259@tmp4.home.vuw.ac.nz>
Date: Sat, 18 May 2013 17:17:53 +1200 (NZST)
From: mark@ecs.vuw.ac.nz
Reply-To: mark@ecs.vuw.ac.nz
To: gnats-bugs@gnats.NetBSD.org
Subject: squid-3.3.4's basic_pam_auth segfaults with libgnumalloc
X-Send-Pr-Version: 3.95
>Number: 47832
>Category: pkg
>Synopsis: squid-3.3.4's basic_pam_auth segfaults with libgnumalloc
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat May 18 05:25:00 +0000 2013
>Originator: Mark Davies
>Release: NetBSD 6.0_STABLE
>Organization:
>Environment:
System: NetBSD tmp4.home.vuw.ac.nz 6.0_STABLE NetBSD 6.0_STABLE (ECS_LAPTOP) #5: Sat Dec 8 14:33:28 NZDT 2012 mark@turakirae.ecs.vuw.ac.nz:/local/SAVE/6.obj/src/work/6/src/sys/arch/i386/compile/ECS_LAPTOP i386
Architecture: i386
Machine: i386
>Description:
squid3's configure script detects the presence of libgnumalloc on
NetBSD 6.x and links it to the binaries built. This causes
basic_pam_auth to segfault in the call to pam_start()
Program received signal SIGSEGV, Segmentation fault.
0x00007f7ff740219a in _free_internal () from /usr/lib/libgnumalloc.so.1
(gdb) bt
#0 0x00007f7ff740219a in _free_internal () from /usr/lib/libgnumalloc.so.1
#1 0x00007f7ff7402b45 in realloc () from /usr/lib/libgnumalloc.so.1
#2 0x00007f7ff68af34c in asprintf () from /usr/lib/libc.so.12
#3 0x00007f7ff7806311 in openpam_dynamic () from /usr/lib/libpam.so.3
#4 0x00007f7ff780615b in openpam_load_module () from /usr/lib/libpam.so.3
#5 0x00007f7ff7805310 in ?? () from /usr/lib/libpam.so.3
#6 0x00007f7ff7805783 in ?? () from /usr/lib/libpam.so.3
#7 0x00007f7ff7805003 in ?? () from /usr/lib/libpam.so.3
#8 0x00007f7ff7805783 in ?? () from /usr/lib/libpam.so.3
#9 0x00007f7ff78058a7 in openpam_configure () from /usr/lib/libpam.so.3
#10 0x00007f7ff7802df6 in pam_start () from /usr/lib/libpam.so.3
#11 0x0000000000401648 in main (argc=<optimized out>, argv=0x7f7fffffd9c8)
at basic_pam_auth.cc:236
>How-To-Repeat:
Build and install squid3 package then run
echo "username passwd" | /usr/pkg/libexec/basic_pam_auth
Observe that it segfaults.
>Fix:
Either persuade the configure script not to link gnumalloc to
everything (CONFIGURE_ENV += ac_cv_lib_gnumalloc_malloc=no)
or if that is not desirable for some reason persuade
helpers/basic_auth/PAM/Makefile not to link with it.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.