From owner-freebsd-ports-bugs@FreeBSD.ORG Sat Sep 21 11:20:00 2013 Return-Path: Delivered-To: freebsd-ports-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C8F48FD5 for ; Sat, 21 Sep 2013 11:20:00 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8F5A5292C for ; Sat, 21 Sep 2013 11:20:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r8LBK0WK004809 for ; Sat, 21 Sep 2013 11:20:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r8LBK0FE004808; Sat, 21 Sep 2013 11:20:00 GMT (envelope-from gnats) Resent-Date: Sat, 21 Sep 2013 11:20:00 GMT Resent-Message-Id: <201309211120.r8LBK0FE004808@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, Francois Tigeot Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id F1F7DEF3 for ; Sat, 21 Sep 2013 11:18:21 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from oldred.freebsd.org (oldred.freebsd.org [8.8.178.121]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DF9072922 for ; Sat, 21 Sep 2013 11:18:21 +0000 (UTC) Received: from oldred.freebsd.org ([127.0.1.6]) by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id r8LBILqs075779 for ; Sat, 21 Sep 2013 11:18:21 GMT (envelope-from nobody@oldred.freebsd.org) Received: (from nobody@localhost) by oldred.freebsd.org (8.14.5/8.14.5/Submit) id r8LBILnR075775; Sat, 21 Sep 2013 11:18:21 GMT (envelope-from nobody) Message-Id: <201309211118.r8LBILnR075775@oldred.freebsd.org> Date: Sat, 21 Sep 2013 11:18:21 GMT From: Francois Tigeot To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: ports/182279: x11-wm/windowmaker: Fix a typo causing memory to be overwritten X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Sep 2013 11:20:00 -0000 >Number: 182279 >Category: ports >Synopsis: x11-wm/windowmaker: Fix a typo causing memory to be overwritten >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Sep 21 11:20:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Francois Tigeot >Release: DragonFly 3.5-DEVELOPMENT >Organization: >Environment: DragonFly sekishi.zefyris.com 3.5-DEVELOPMENT DragonFly v3.5.0.961.gd8b0268-DEVELOPMENT #183: Fri Sep 20 09:48:57 CEST 2013 ftigeot@sekishi.zefyris.com:/usr/obj/usr/src/sys/X86_64_GENERIC x86_64 >Description: This patch fixes an array-out-of-bounds memory access issue. I stumbled upon this bug by pure chance after constantly getting signal 11s from a WindowMaker built with gcc 4.7 (I used 4.4 until now). gcc 4.4 and previous versions didn't show any obvious issue even though some memory has always been overwritten. >How-To-Repeat: The problem has always been there. Try running an x11-wm/windowmaker binary built with gcc-4.7 for instant crashes. >Fix: Patch attached with submission follows: --- src/osdep_bsd.c.orig 2013-09-12 21:43:54.000000000 +0000 +++ src/osdep_bsd.c @@ -86,7 +86,7 @@ Bool GetCommandForPid(int pid, char ***a mib[0] = CTL_KERN; mib[1] = KERN_ARGMAX; mib[2] = 0; - mib[4] = 0; + mib[3] = 0; count = sizeof(argmax); if (sysctl(mib, 2, &argmax, &count, NULL, 0) == -1) >Release-Note: >Audit-Trail: >Unformatted: