From owner-freebsd-bugs@FreeBSD.ORG Tue Oct 2 18:00:25 2012 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E3B22106564A for ; Tue, 2 Oct 2012 18:00:25 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 9CE538FC14 for ; Tue, 2 Oct 2012 18:00:25 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q92I0PTq036945 for ; Tue, 2 Oct 2012 18:00:25 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q92I0PO6036936; Tue, 2 Oct 2012 18:00:25 GMT (envelope-from gnats) Resent-Date: Tue, 2 Oct 2012 18:00:25 GMT Resent-Message-Id: <201210021800.q92I0PO6036936@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, "Daniel U. Thibault" Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 19020106564A for ; Tue, 2 Oct 2012 17:57:05 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id E86EB8FC14 for ; Tue, 2 Oct 2012 17:57:04 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.5/8.14.5) with ESMTP id q92Hv4o7070844 for ; Tue, 2 Oct 2012 17:57:04 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.5/8.14.5/Submit) id q92Hv4E3070843; Tue, 2 Oct 2012 17:57:04 GMT (envelope-from nobody) Message-Id: <201210021757.q92Hv4E3070843@red.freebsd.org> Date: Tue, 2 Oct 2012 17:57:04 GMT From: "Daniel U. Thibault" To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: misc/172283: OpenBSM-21/openbsm/libbsm/bsm_token.c incorrectly implies an au_to_header64_ex_tm X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Oct 2012 18:00:26 -0000 >Number: 172283 >Category: misc >Synopsis: OpenBSM-21/openbsm/libbsm/bsm_token.c incorrectly implies an au_to_header64_ex_tm >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Oct 02 18:00:25 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Daniel U. Thibault >Release: >Organization: DRDC Valcartier >Environment: >Description: The au_to_header32_ex_tm function of bsm_token.c (a component of the current libbsm implementation) reads in part: /* [...] * seconds of time 4 bytes/8 bytes (32-bit/64-bit value) * milliseconds of time 4 bytes/8 bytes (32-bit/64-bit value) */ token_t * au_to_header32_ex_tm(int rec_size, au_event_t e_type, au_emod_t e_mod, struct timeval tm, struct auditinfo_addr *aia) Everywhere else within this file, a mention of "4 bytes/8 bytes (32-bit/64-bit value)" means the function described exists also as a 64-bit version. Hence one expects au_to_header64_ex_tm to follow shortly after au_to_header32_ex_tm ---but there is no such function. >How-To-Repeat: Look up http://www.opensource.apple.com/source/OpenBSM/OpenBSM-21/openbsm/libbsm/bsm_token.c and search for au_to_header32_ex_tm >Fix: Either change the au_to_header32_ex_tm preamble to conclude with: * seconds of time 4 bytes * milliseconds of time 4 bytes */ or add an au_to_header64_ex_tm function to libbsm (easily done by making a slightly-modified copy of au_to_header32_ex_tm; also declare this in openbsm/sys/bsm/audit_record.h). >Release-Note: >Audit-Trail: >Unformatted: