public inbox for linux-audit@redhat.com
 help / color / mirror / Atom feed
From: John Dennis <jdennis@redhat.com>
To: Steve Grubb <sgrubb@redhat.com>
Cc: linux-audit@redhat.com, viro@zeniv.linux.org.uk,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2] audit: fix NUL handling in untrusted strings
Date: Thu, 11 Sep 2008 15:19:49 -0400	[thread overview]
Message-ID: <48C96F55.3080102@redhat.com> (raw)
In-Reply-To: <200809111508.13658.sgrubb@redhat.com>


[-- Attachment #1.1: Type: text/plain, Size: 1018 bytes --]

Steve Grubb wrote:
> On Thursday 11 September 2008 14:10:12 Miloslav Trmač wrote:
>   
>>> As a side note I'm concerned there may be places in the user audit
>>> code which treat string data as null terminated (at least that is my
>>> recollection).
>>>       
>> Yes, auditd adds a NUL terminator to the audit record, and then treats
>> it as a regular NUL-terminated string; if the audit record contains an
>> embedded NUL byte, the rest of the record is discarded by auditd.
>>     
>
> In every case where this occurs (kernel or user space), the field values are 
> expected to be encoded to prevent it from being discarded.
>   

This is true. The proposed patch defeats the encoding of the entire data 
block and thus fails the criteria Steve correctly states is a requirement.

The concern I have in the user level audit code is not with handling the 
encoded string values which is fine, but rather with the handling the 
decoded string block.

-- 
John Dennis <jdennis@redhat.com>


[-- Attachment #1.2: Type: text/html, Size: 1609 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



  reply	other threads:[~2008-09-11 19:19 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-10 22:23 [PATCH 1/2] audit: fix NUL handling in untrusted strings Miloslav Trmač
2008-09-11 14:25 ` Eric Paris
2008-09-11 14:43   ` Miloslav Trmač
2008-09-11 17:30   ` John Dennis
2008-09-11 18:10     ` Miloslav Trmač
2008-09-11 18:15       ` Miloslav Trmač
2008-09-11 19:08       ` Steve Grubb
2008-09-11 19:19         ` John Dennis [this message]
2008-09-11 19:12       ` John Dennis
2008-09-11 19:27         ` Miloslav Trmač
2008-09-11 19:47           ` John Dennis
2008-09-11 20:03             ` Miloslav Trmač
2008-09-11 19:14 ` Andrew Morton
2008-09-11 19:37   ` Miloslav Trmač

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48C96F55.3080102@redhat.com \
    --to=jdennis@redhat.com \
    --cc=linux-audit@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sgrubb@redhat.com \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox