NetBSD Problem Report #44275

From taya@dandelion.m2g.org  Fri Dec 24 09:37:40 2010
Return-Path: <taya@dandelion.m2g.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id E2E3163B86D
	for <gnats-bugs@gnats.NetBSD.org>; Fri, 24 Dec 2010 09:37:39 +0000 (UTC)
Message-Id: <20101224073406.6749A2B464@dandelion.m2g.org>
Date: Fri, 24 Dec 2010 16:34:06 +0900 (JST)
From: taya@ba2.so-net.ne.jp
Reply-To: taya@ba2.so-net.ne.jp
To: gnats-bugs@gnats.NetBSD.org
Subject: cyrus-imapd24 unstable on -current
X-Send-Pr-Version: 3.95

>Number:         44275
>Category:       pkg
>Synopsis:       cyrus-imapd24 unstable on -current
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    obache
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Dec 24 09:40:00 +0000 2010
>Closed-Date:    Mon Oct 10 13:31:39 +0000 2011
>Last-Modified:  Mon Oct 10 13:31:39 +0000 2011
>Originator:     Shin'ichiro TAYA
>Release:        NetBSD 5.99.41
>Organization:

--
Shin'ichiro TAYA <taya@ba2.so-net.ne.jp>
>Environment:
System: NetBSD xxx 5.99.41 NetBSD 5.99.41 (GENERIC) #2: Thu Dec 23 12:54:24 JST 2010 taya@xxx:/export/NetBSD/NetBSD-current/OBJ.i386/export/NetBSD/NetBSD-current/src/sys/arch/i386/compile/GENERIC i386
Architecture: i386
Machine: i386
>Description:
	cyrus-imapd24 and related command is unstable on -current and suddenly quits.

>How-To-Repeat:
	most simple way to reproduce is to run /usr/pkg/cyrus/bin/reconstruct.

	root@xxx# /usr/pkg/cyrus/bin/reconstruct 
	user.taya uid 845258 found - adding
	Segmentation fault
	root@xxx# 

>Fix:
	Inspite of the size of time_t is 8 bytes, cyrus code assumes it's 
	4 bytes.
	"reconstruct" crushes at following point..

--
mailbox.c:1892
   snprintf(buf, 4096, "%u " MODSEQ_FMT " %lu (%u) %lu %s", 
            record->uid, record->modseq, record->last_updated,
            flagcrc,
            record->internaldate, 
            message_guid_encode(&record->guid));
--

	record->last_updated & record-internaldate is time_t 
	but format string is "%lu" thus last string argument is not passed 
	correctly and snprintf() treats invalid pointer as string and crushes.
	There may be more places to fix.

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->obache
Responsible-Changed-By: wiz@NetBSD.org
Responsible-Changed-When: Fri, 24 Dec 2010 12:08:57 +0000
Responsible-Changed-Why:
Over to maintainer.


From: "OBATA Akio" <obache@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/44275 (cyrus-imapd24 unstable on -current)
Date: Fri, 24 Dec 2010 23:32:46 +0900

 64-bits time_t is sensitive issue.

 Some of them must be treated 64-bits (internal use of time_t),
 other of them must be treated as 32-bits (for protocol spec),
 and rest, undefined (defined as time_t, but how to send? store?).

 I've post to upstream Bugzilla
 http://bugzilla.cyrusimap.org/show_bug.cgi?id=3376

 -- 
 OBATA Akio / obache@NetBSD.org

State-Changed-From-To: open->feedback
State-Changed-By: obache@NetBSD.org
State-Changed-When: Wed, 06 Jul 2011 09:49:06 +0000
State-Changed-Why:
Add two patches for the issue.  Still remain it in other place for you?


From: "OBATA Akio" <obache@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/44275 CVS commit: pkgsrc/mail/cyrus-imapd24
Date: Wed, 6 Jul 2011 09:45:45 +0000

 Module Name:	pkgsrc
 Committed By:	obache
 Date:		Wed Jul  6 09:45:45 UTC 2011

 Modified Files:
 	pkgsrc/mail/cyrus-imapd24: Makefile distinfo options.mk
 	pkgsrc/mail/cyrus-imapd24/patches: patch-ab patch-aq
 Added Files:
 	pkgsrc/mail/cyrus-imapd24/patches: patch-imap_mailbox.c

 Log Message:
 Update cyrus-imapd24 to 2.4.10.

 While here,
 * Exactly enable/disable PCRE support with package option, enabled by default.
 * Add workaround patches for PR#44275, sizeof(time_t) > sizeof(unsigned long).

 Changes to the Cyrus IMAP Server since 2.4.9

       * fixed handling of unparsable emails during append (which would
         cause invalid cyrus.index records otherwise)
       * quota: fix a pile of bugs. #1801, virtdomain support; #2728, slow
         user delete; #3178, "file name too long" with big mailbox names;
         #3179, quota -f doubles usage.
       * Bug #3043 - parse multiple groups in headers correctly
       * Bug #3158 - lmtp backend connection timeout
       * Bug #3223 - limit MIME parsing depth to avoid stack overflows
       * Bug #3273 - add SORT=DISPLAY support (but note: still questions
         about correctness of unicode sorting)
       * Bug #3504 - convert all sieve scripts to \r\n line endings on
         upload
       * Bug #3402 - options to munge 8bit characters in headers during lmtp
         delivery to avoid backscatter
       * sync_client: fix broken keepalive TCP options (I doubt anyone ever
         tried to use it)
       * Bug #3482 - add "-o" option to ipurge to only purge messages with
         \Deleted flag set


 To generate a diff of this commit:
 cvs rdiff -u -r1.9 -r1.10 pkgsrc/mail/cyrus-imapd24/Makefile
 cvs rdiff -u -r1.10 -r1.11 pkgsrc/mail/cyrus-imapd24/distinfo
 cvs rdiff -u -r1.2 -r1.3 pkgsrc/mail/cyrus-imapd24/options.mk
 cvs rdiff -u -r1.4 -r1.5 pkgsrc/mail/cyrus-imapd24/patches/patch-ab
 cvs rdiff -u -r1.2 -r1.3 pkgsrc/mail/cyrus-imapd24/patches/patch-aq
 cvs rdiff -u -r0 -r1.1 pkgsrc/mail/cyrus-imapd24/patches/patch-imap_mailbox.c

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

From: "Shin'ichiro TAYA" <taya@ba2.so-net.ne.jp>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/44275 (cyrus-imapd24 unstable on -current)
Date: Mon, 10 Oct 2011 22:20:14 +0900

 works fine now.
 thank you.

State-Changed-From-To: feedback->closed
State-Changed-By: obache@NetBSD.org
State-Changed-When: Mon, 10 Oct 2011 13:31:39 +0000
State-Changed-Why:
Confirmed fixed.  Thanks!


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(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.