Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 2 Oct 2012 17:57:04 GMT
From:      "Daniel U. Thibault" <daniel.thibault@drdc-rddc.gc.ca>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   misc/172283: OpenBSM-21/openbsm/libbsm/bsm_token.c incorrectly implies an au_to_header64_ex_tm
Message-ID:  <201210021757.q92Hv4E3070843@red.freebsd.org>
Resent-Message-ID: <201210021800.q92I0PO6036936@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201210021757.q92Hv4E3070843>