Bug 137972

Summary: mail/fetchmail 6.3.11 crashes with segmentation fault on start
Product: Ports & Packages Reporter: Christian Ludwig <chrissicool>
Component: Individual Port(s)Assignee: Wesley Shields <wxs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description Christian Ludwig 2009-08-19 20:00:04 UTC
After upgrading fetchmail to version 6.3.11, when invoking fetchmail it immediately segfaults. The probem did not occur with the previous release 6.3.10 from the ports.

The syslog says:
kernel: pid 94413 (fetchmail), uid 124: exited on signal 11

Fix: 

I think Gentoo has a fix for this here http://bugs.gentoo.org/show_bug.cgi?id=280760
How-To-Repeat: Configure and invoke fetchmail by running /usr/local/etc/rc.d/fetchmail/start
Comment 1 Edwin Groothuis freebsd_committer 2009-08-27 10:38:58 UTC
Maintainer of mail/fetchmail,

Please note that PR ports/137972 has just been submitted.

If it contains a patch for an upgrade, an enhancement or a bug fix
you agree on, reply to this email stating that you approve the patch
and a committer will take care of it.

The full text of the PR can be found at:
    http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/137972

-- 
Edwin Groothuis via the GNATS Auto Assign Tool
edwin@FreeBSD.org
Comment 2 Edwin Groothuis freebsd_committer 2009-08-27 10:38:59 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 3 Corey Halpin 2009-09-02 02:57:04 UTC
  Quite right.

  A patch for the port is attached.

~crh

diff -ruN /usr/ports/mail/fetchmail/files/socket.c.patch fetchmail/files/socket.c.patch
--- /usr/ports/mail/fetchmail/files/socket.c.patch	1969-12-31 18:00:00.000000000 -0600
+++ fetchmail/files/socket.c.patch	2009-09-01 20:45:14.000000000 -0500
@@ -0,0 +1,15 @@
+--- socket.c.org	2009-08-08 16:01:49.000000000 +0200
++++ socket.c	2009-08-08 16:03:17.000000000 +0200
+@@ -628,9 +628,10 @@
+ 				report(stdout, GT_("Unknown Issuer CommonName\n"));
+ 		}
+ 		if ((i = X509_NAME_get_text_by_NID(subj, NID_commonName, buf, sizeof(buf))) != -1) {
+-			if (outlevel >= O_VERBOSE)
++			if (outlevel >= O_VERBOSE) {
+ 				report(stdout, GT_("Server CommonName: %s\n"), (tt = sdump(buf, i)));
+-			xfree(tt);
++				xfree(tt);
++			}
+ 			if ((size_t)i >= sizeof(buf) - 1) {
+ 				/* Possible truncation. In this case, this is a DNS name, so this
+ 				 * is really bad. We do not tolerate this even in the non-strict case. */
Comment 4 Mark Linimon freebsd_committer freebsd_triage 2009-09-02 10:44:02 UTC
State Changed
From-To: feedback->open

Maintainer has replied with a patch.
Comment 5 Mark Linimon freebsd_committer freebsd_triage 2009-09-06 19:33:17 UTC
State Changed
From-To: open->analyzed

Submitter confirms that hte patch fixes the problem.
Comment 6 Mark Linimon 2009-09-06 19:34:41 UTC
----- Forwarded message from Christian Ludwig <chrissicool@chrissicool.net> -----

From: Christian Ludwig <chrissicool@chrissicool.net>
To: linimon@FreeBSD.org
Cc: freebsd-ports-bugs@FreeBSD.org, chalpin@cs.wisc.edu
Subject: Re: ports/137972: mail/fetchmail 6.3.11 crashes with segmentation
	fault on start

Hi,

I tried that patch and it works fine on my machine.

Thanks for the work.


 - Christian

_______________________________________________
freebsd-ports-bugs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports-bugs
To unsubscribe, send any mail to "freebsd-ports-bugs-unsubscribe@freebsd.org"


----- End forwarded message -----
Comment 7 Wesley Shields freebsd_committer 2009-09-08 14:58:42 UTC
Responsible Changed
From-To: freebsd-ports-bugs->wxs

I'll take it.
Comment 8 Wesley Shields freebsd_committer 2009-09-08 16:12:29 UTC
State Changed
From-To: analyzed->closed

Committed. Thanks!
Comment 9 dfilter service freebsd_committer 2009-09-08 16:12:36 UTC
wxs         2009-09-08 15:12:21 UTC

  FreeBSD ports repository

  Modified files:
    mail/fetchmail       Makefile 
  Added files:
    mail/fetchmail/files patch-socket.c 
  Log:
  - Add a patch to fix segfault on startup.
  
  PR:             ports/137972
  Submitted by:   Christian Ludwig <chrissicool@chrissicool.net>
  Approved by:    Corey Halpin <chalpin@cs.wisc.edu> (maintainer)
  
  Revision  Changes    Path
  1.203     +1 -0      ports/mail/fetchmail/Makefile
  1.3       +15 -0     ports/mail/fetchmail/files/patch-socket.c (new)
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"