01 May, 2006

3 commits

  • Hi,

    The patch below builds upon the patch sent earlier and adds subject label to
    all audit events generated via the netlink interface. It also cleans up a few
    other minor things.

    Signed-off-by: Steve Grubb

    Signed-off-by: Al Viro

    Steve Grubb
     
  • The following patch provides selinux interfaces that will allow the audit
    system to perform filtering based on the process context (user, role, type,
    sensitivity, and clearance). These interfaces will allow the selinux
    module to perform efficient matches based on lower level selinux constructs,
    rather than relying on context retrievals and string comparisons within
    the audit module. It also allows for dominance checks on the mls portion
    of the contexts that are impossible with only string comparisons.

    Signed-off-by: Darrel Goeddel
    Signed-off-by: Al Viro

    Darrel Goeddel
     
  • ... it's always current, and that's a good thing - allows simpler locking.

    Signed-off-by: Al Viro

    Al Viro
     

21 Mar, 2006

10 commits

  • Hi,

    When a network interface goes into promiscuous mode, its an important security
    issue. The attached patch is intended to capture that action and send an
    event to the audit system.

    The patch carves out a new block of numbers for kernel detected anomalies.
    These are events that may indicate suspicious activity. Other examples of
    potential kernel anomalies would be: exceeding disk quota, rlimit violations,
    changes to syscall entry table.

    Signed-off-by: Steve Grubb
    Signed-off-by: Al Viro

    Steve Grubb
     
  • Hi,

    The following patch adds a little more information to the add/remove rule message emitted
    by the kernel.

    Signed-off-by: Steve Grubb
    Signed-off-by: Al Viro

    Steve Grubb
     
  • Updated patch to dynamically allocate audit rule fields in kernel's
    internal representation. Added unlikely() calls for testing memory
    allocation result.

    Amy Griffis wrote: [Wed Jan 11 2006, 02:02:31PM EST]
    > Modify audit's kernel-userspace interface to allow the specification
    > of string fields in audit rules.
    >
    > Signed-off-by: Amy Griffis

    Signed-off-by: Al Viro
    (cherry picked from 5ffc4a863f92351b720fe3e9c5cd647accff9e03 commit)

    Amy Griffis
     
  • Attached is a patch that hardwires important SE Linux events to the audit
    system. Please Apply.

    Signed-off-by: Steve Grubb
    Acked-by: Stephen Smalley
    Signed-off-by: David Woodhouse

    Steve Grubb
     
  • This fixes the per-user and per-message-type filtering when syscall
    auditing isn't enabled.

    [AV: folded followup fix from the same author]

    Signed-off-by: David Woodhouse
    Signed-off-by: Al Viro

    David Woodhouse
     
  • This patch extends existing audit records with subject/object context
    information. Audit records associated with filesystem inodes, ipc, and
    tasks now contain SELinux label information in the field "subj" if the
    item is performing the action, or in "obj" if the item is the receiver
    of an action.

    These labels are collected via hooks in SELinux and appended to the
    appropriate record in the audit code.

    This additional information is required for Common Criteria Labeled
    Security Protection Profile (LSPP).

    [AV: fixed kmalloc flags use]
    [folded leak fixes]
    [folded cleanup from akpm (kfree(NULL)]
    [folded audit_inode_context() leak fix]
    [folded akpm's fix for audit_ipc_perm() definition in case of !CONFIG_AUDIT]

    Signed-off-by: Dustin Kirkland
    Signed-off-by: David Woodhouse
    Signed-off-by: Andrew Morton
    Signed-off-by: Al Viro

    Dustin Kirkland
     
  • - Add a new, 5th filter called "exclude".
    - And add a new field AUDIT_MSGTYPE.
    - Define a new function audit_filter_exclude() that takes a message type
    as input and examines all rules in the filter. It returns '1' if the
    message is to be excluded, and '0' otherwise.
    - Call the audit_filter_exclude() function near the top of
    audit_log_start() just after asserting audit_initialized. If the
    message type is not to be audited, return NULL very early, before
    doing a lot of work.
    [combined with followup fix for bug in original patch, Nov 4, same author]
    [combined with later renaming AUDIT_FILTER_EXCLUDE->AUDIT_FILTER_TYPE
    and audit_filter_exclude() -> audit_filter_type()]

    Signed-off-by: Dustin Kirkland
    Signed-off-by: David Woodhouse
    Signed-off-by: Al Viro

    Dustin Kirkland
     
  • This patch augments the collection of inode info during syscall
    processing. It represents part of the functionality that was provided
    by the auditfs patch included in RHEL4.

    Specifically, it:

    - Collects information for target inodes created or removed during
    syscalls. Previous code only collects information for the target
    inode's parent.

    - Adds the audit_inode() hook to syscalls that operate on a file
    descriptor (e.g. fchown), enabling audit to do inode filtering for
    these calls.

    - Modifies filtering code to check audit context for either an inode #
    or a parent inode # matching a given rule.

    - Modifies logging to provide inode # for both parent and child.

    - Protect debug info from NULL audit_names.name.

    [AV: folded a later typo fix from the same author]

    Signed-off-by: Amy Griffis
    Signed-off-by: David Woodhouse
    Signed-off-by: Al Viro

    Amy Griffis
     
  • The attached patch updates various items for the new user space
    messages. Please apply.

    Signed-off-by: Steve Grubb
    Signed-off-by: David Woodhouse

    Steve Grubb
     
  • Currently, audit only supports the "=" and "!=" operators in the -F
    filter rules.

    This patch reworks the support for "=" and "!=", and adds support
    for ">", ">=", "
    Signed-off-by: David Woodhouse

    Dustin Kirkland
     

28 Oct, 2005

1 commit


13 Jul, 2005

1 commit


11 Jul, 2005

1 commit


02 Jul, 2005

2 commits


24 Jun, 2005

1 commit


22 Jun, 2005

2 commits


21 Jun, 2005

1 commit


20 Jun, 2005

2 commits


27 May, 2005

1 commit


22 May, 2005

1 commit

  • Move audit_serial() into audit.c and use it to generate serial numbers
    on messages even when there is no audit context from syscall auditing.
    This allows us to disambiguate audit records when more than one is
    generated in the same millisecond.

    Based on a patch by Steve Grubb after he observed the problem.

    Signed-off-by: David Woodhouse

    David Woodhouse
     

21 May, 2005

1 commit


18 May, 2005

1 commit


17 May, 2005

1 commit


14 May, 2005

2 commits

  • I'm going through the kernel code and have a patch that corrects
    several spelling errors in comments.

    From: Steve Grubb
    Signed-off-by: David Woodhouse

    Steve Grubb
     
  • This patch adds more messages types to the audit subsystem so that audit
    analysis is quicker, intuitive, and more useful.

    Signed-off-by: Steve Grubb
    ---
    I forgot one type in the big patch. I need to add one for user space
    originating SE Linux avc messages. This is used by dbus and nscd.

    -Steve
    ---
    Updated to 2.6.12-rc4-mm1.
    -dwmw2

    Signed-off-by: David Woodhouse

    Steve Grubb
     

11 May, 2005

2 commits

  • Add audit_log_type to allow callers to specify type and pid when logging.
    Convert audit_log to wrapper around audit_log_type. Could have
    converted all audit_log callers directly, but common case is default
    of type AUDIT_KERNEL and pid 0. Update audit_log_start to take type
    and pid values when creating a new audit_buffer. Move sequences that
    did audit_log_start, audit_log_format, audit_set_type, audit_log_end,
    to simply call audit_log_type directly. This obsoletes audit_set_type
    and audit_set_pid, so remove them.

    Signed-off-by: Chris Wright
    Signed-off-by: David Woodhouse

    Chris Wright
     
  • Remove code conditionally dependent on CONFIG_AUDITSYSCALL from audit.c.
    Move these dependencies to audit.h with the rest.

    Signed-off-by: Chris Wright
    Signed-off-by: David Woodhouse

    Chris Wright
     

06 May, 2005

1 commit

  • shutdown credential information. It creates a new message type
    AUDIT_TERM_INFO, which is used by the audit daemon to query who issued the
    shutdown.

    It requires the placement of a hook function that gathers the information. The
    hook is after the DAC & MAC checks and before the function returns. Racing
    threads could overwrite the uid & pid - but they would have to be root and
    have policy that allows signalling the audit daemon. That should be a
    manageable risk.

    The userspace component will be released later in audit 0.7.2. When it
    receives the TERM signal, it queries the kernel for shutdown information.
    When it receives it, it writes the message and exits. The message looks
    like this:

    type=DAEMON msg=auditd(1114551182.000) auditd normal halt, sending pid=2650
    uid=525, auditd pid=1685

    Signed-off-by: Steve Grubb
    Signed-off-by: David Woodhouse

    Steve Grubb
     

30 Apr, 2005

1 commit

  • Attached is a new patch that solves the issue of getting valid credentials
    into the LOGIN message. The current code was assuming that the audit context
    had already been copied. This is not always the case for LOGIN messages.

    To solve the problem, the patch passes the task struct to the function that
    emits the message where it can get valid credentials.

    Signed-off-by: Steve Grubb
    Signed-off-by: David Woodhouse

    Steve Grubb
     

29 Apr, 2005

5 commits

  • Most audit control messages are sent over netlink.In order to properly
    log the identity of the sender of audit control messages, we would like
    to add the loginuid to the netlink_creds structure, as per the attached
    patch.

    Signed-off-by: Serge Hallyn
    Signed-off-by: David Woodhouse

    Serge Hallyn
     
  •  
  • Attached is a patch that corrects a signed/unsigned warning. I also noticed
    that we needlessly init serial to 0. That only needs to occur if the kernel
    was compiled without the audit system.

    -Steve Grubb

    Signed-off-by: David Woodhouse

    Steve Grubb
     
  • We were calling ptrace_notify() after auditing the syscall and arguments,
    but the debugger could have _changed_ them before the syscall was actually
    invoked. Reorder the calls to fix that.

    While we're touching ever call to audit_syscall_entry(), we also make it
    take an extra argument: the architecture of the syscall which was made,
    because some architectures allow more than one type of syscall.

    Also add an explicit success/failure flag to audit_syscall_exit(), for
    the benefit of architectures which return that in a condition register
    rather than only returning a single register.

    Change type of syscall return value to 'long' not 'int'.

    Signed-off-by: David Woodhouse

     
  • We log strings from userspace, such as arguments to open(). These could
    be formatted to contain \n followed by fake audit log entries. Provide
    a function for logging such strings, which gives a hex dump when the
    string contains anything but basic printable ASCII characters. Use it
    for logging filenames.

    Signed-off-by: David Woodhouse