From mboxrd@z Thu Jan 1 00:00:00 1970 From: Steve Grubb Subject: Re: [PATCH 1/2] audit: fix NUL handling in untrusted strings Date: Thu, 11 Sep 2008 15:08:13 -0400 Message-ID: <200809111508.13658.sgrubb@redhat.com> References: <1221085418.2705.19.camel@amilo> <48C955C8.2000602@redhat.com> <1221156612.17533.14.camel@amilo> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <1221156612.17533.14.camel@amilo> Content-Disposition: inline List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-audit-bounces@redhat.com Errors-To: linux-audit-bounces@redhat.com To: linux-audit@redhat.com Cc: linux-kernel , viro@zeniv.linux.org.uk List-Id: linux-audit@redhat.com On Thursday 11 September 2008 14:10:12 Miloslav Trma=C4=8D 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=20 expected to be encoded to prevent it from being discarded. -Steve