From owner-freebsd-ports-bugs@FreeBSD.ORG Sat Nov 26 18:50:27 2005 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8B87D16A41F for ; Sat, 26 Nov 2005 18:50:27 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9963243D8F for ; Sat, 26 Nov 2005 18:50:04 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id jAQIo2ow040803 for ; Sat, 26 Nov 2005 18:50:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id jAQIo2BY040802; Sat, 26 Nov 2005 18:50:02 GMT (envelope-from gnats) Resent-Date: Sat, 26 Nov 2005 18:50:02 GMT Resent-Message-Id: <200511261850.jAQIo2BY040802@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Manuel Kasper Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D6C5F16A420 for ; Sat, 26 Nov 2005 18:47:59 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 63FD643D64 for ; Sat, 26 Nov 2005 18:47:44 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id jAQIlcHj052780 for ; Sat, 26 Nov 2005 18:47:38 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id jAQIlcQi052779; Sat, 26 Nov 2005 18:47:38 GMT (envelope-from nobody) Message-Id: <200511261847.jAQIlcQi052779@www.freebsd.org> Date: Sat, 26 Nov 2005 18:47:38 GMT From: Manuel Kasper To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Cc: Subject: ports/89599: [fix] security/ipsec-tools: racoon crashes under FreeBSD 4.11 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Nov 2005 18:50:27 -0000 >Number: 89599 >Category: ports >Synopsis: [fix] security/ipsec-tools: racoon crashes under FreeBSD 4.11 >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Nov 26 18:50:02 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Manuel Kasper >Release: FreeBSD 4.11-RELEASE-p13 >Organization: >Environment: FreeBSD fb411.neon1.net 4.11-RELEASE-p13 FreeBSD 4.11-RELEASE-p13 #0: Sat Nov 26 11:53:57 CET 2005 root@fb411.neon1.net:/usr/obj/usr/src/sys/GENERIC i386 >Description: racoon from ipsec-tools 0.6.3 (installed via ports) doesn't appear to work properly under FreeBSD 4.11. As soon as the first IKE packet is received from a client, it'll crash with signal 11. I've traced this to line 1745 in isakmp.c, where it calls plog() with a format string that is later passed on to vfprintf(). Apparently, unlike FreeBSD 5/6, FreeBSD 4.11's vfprintf() doesn't support the 'z' length modifier (which is used to print size_t safely), so it'll ignore the first conversion specification and then use sbuf->l for the %s, accessing an invalid memory location in the process. The configure script even checks for this ("checking if printf accepts %z... no"), but only adds -Wno-format to CFLAGS, which obviously doesn't solve the problem. >How-To-Repeat: Install ipsec-tools 0.6.3 via ports on a FreeBSD 4.11 machine. Configure and start racoon. Establish an IKE session from a remote client. Observe racoon dump core immediately. >Fix: The solution for me was to replace all occurrences of %zu with %lu in src/racoon. >Release-Note: >Audit-Trail: >Unformatted: