From owner-freebsd-ports-bugs@FreeBSD.ORG Fri Jul 5 08:40:01 2013 Return-Path: Delivered-To: freebsd-ports-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id D30E0999 for ; Fri, 5 Jul 2013 08:40:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id B632F1BBC for ; Fri, 5 Jul 2013 08:40:01 +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 r658e18c015349 for ; Fri, 5 Jul 2013 08:40:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r658e1OR015348; Fri, 5 Jul 2013 08:40:01 GMT (envelope-from gnats) Resent-Date: Fri, 5 Jul 2013 08:40:01 GMT Resent-Message-Id: <201307050840.r658e1OR015348@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, Marcin Cieslak Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id ABF7A8CA; Fri, 5 Jul 2013 08:32:11 +0000 (UTC) (envelope-from saper@saper.info) Received: from l.saper.info (l.saper.info [IPv6:2001:41d0:1:d467::1000]) by mx1.freebsd.org (Postfix) with ESMTP id 00F401B33; Fri, 5 Jul 2013 08:32:10 +0000 (UTC) Received: from l.saper.info (uucp@localhost [127.0.0.1]) by l.saper.info (8.14.6/8.14.6) with ESMTP id r658W6dY085804 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 5 Jul 2013 08:32:06 GMT (envelope-from saper@saper.info) Received: (from uucp@localhost) by l.saper.info (8.14.6/8.14.6/Submit) with UUCP id r658W6sW085803; Fri, 5 Jul 2013 08:32:06 GMT (envelope-from saper@saper.info) Received: from radziecki.saper.info (saper@localhost [127.0.0.1]) by radziecki.saper.info (8.14.5/8.14.5) with ESMTP id r658Vfbr011916 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 5 Jul 2013 08:31:41 GMT (envelope-from saper@saper.info) Received: (from saper@localhost) by radziecki.saper.info (8.14.5/8.14.5/Submit) id r658Vf9G011912; Fri, 5 Jul 2013 08:31:41 GMT (envelope-from saper) Message-Id: <201307050831.r658Vf9G011912@radziecki.saper.info> Date: Fri, 5 Jul 2013 08:31:41 GMT From: Marcin Cieslak To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 Subject: ports/180291: [PATCH] security/openct: don't crash when backed cannot be signalled Cc: ale@freebsd.org 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: Fri, 05 Jul 2013 08:40:02 -0000 >Number: 180291 >Category: ports >Synopsis: [PATCH] security/openct: don't crash when backed cannot be signalled >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Fri Jul 05 08:40:01 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Marcin Cieslak >Release: FreeBSD 10.0-CURRENT amd64 >Organization: http://saper.info >Environment: System: FreeBSD radziecki.saper.info 10.0-CURRENT FreeBSD 10.0-CURRENT #2 r241671M: Thu Oct 18 09:38:06 CEST >Description: My pcscd could not communicate with ifd because some problems when attaching to the ccid ifdhandler of openct (I am using PCMCIA Omnikey 4040 card reader via cmx(4)). It crashed when trying to initialize the handler. A patch attached fixes the crash I got. The original problem must have been somewhere else (wrong permissions/stale PID number of the handler) but nevertheless at least now we get an error message instead of the crash. Added file(s): - files/patch-ctapi.c Port maintainer (ale@FreeBSD.org) is cc'd. Generated with FreeBSD Port Tools 0.99 >How-To-Repeat: >Fix: --- openct-0.6.20.patch begins here --- diff -ruN --exclude=CVS /usr/ports/security/openct.orig/files/patch-ctapi.c /usr/ports/security/openct/files/patch-ctapi.c --- /usr/ports/security/openct.orig/files/patch-ctapi.c 1970-01-01 01:00:00.000000000 +0100 +++ /usr/ports/security/openct/files/patch-ctapi.c 2013-07-05 10:23:33.000000000 +0200 @@ -0,0 +1,15 @@ +--- src/ctapi/ctapi.c 2006-04-25 23:58:06.000000000 +0200 ++++ src/ctapi/ctapi.c 2013-07-05 10:08:41.000000000 +0200 +@@ -562,7 +562,11 @@ + ct->next = cardTerminals; + cardTerminals = ct; + ct->cwd = &ct->mf; +- ct_reader_info(pn, &info); ++ if (ct_reader_info(pn, &info) < 0) { ++ free(ct); ++ ct_error("ct_reader_info failed\n"); ++ return ERR_INVALID; ++ } + ct->mf.id = 0x3f00; + ct->mf.gen = dir; + ct->mf.dir[0] = &ct->mf; --- openct-0.6.20.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted: