RE: [Syslog] delineated datagrams

"John Calcote" <jcalcote@novell.com> Wed, 09 August 2006 19:21 UTC

Received: from [127.0.0.1] (helo=stiedprmman1.va.neustar.com) by megatron.ietf.org with esmtp (Exim 4.43) id 1GAtcM-0005D1-BG; Wed, 09 Aug 2006 15:21:26 -0400
Received: from [10.91.34.44] (helo=ietf-mx.ietf.org) by megatron.ietf.org with esmtp (Exim 4.43) id 1GAtcK-0005AU-Nt for syslog@ietf.org; Wed, 09 Aug 2006 15:21:24 -0400
Received: from stsc1260-eth-s1-s1p1-vip.va.neustar.com ([156.154.16.129] helo=chiedprmail1.ietf.org) by ietf-mx.ietf.org with esmtp (Exim 4.43) id 1GAtQN-0006s0-3G for syslog@ietf.org; Wed, 09 Aug 2006 15:09:03 -0400
Received: from sinclair.provo.novell.com ([137.65.81.169]) by chiedprmail1.ietf.org with esmtp (Exim 4.43) id 1GAtQJ-00019x-Hp for syslog@ietf.org; Wed, 09 Aug 2006 15:09:02 -0400
Received: from INET-PRV-MTA by sinclair.provo.novell.com with Novell_GroupWise; Wed, 09 Aug 2006 13:08:50 -0600
Message-Id: <44D9DDE4.37FF.0081.0@novell.com>
X-Mailer: Novell GroupWise Internet Agent 7.0.1
Date: Wed, 09 Aug 2006 13:06:44 -0600
From: John Calcote <jcalcote@novell.com>
To: Balazs Scheidler <bazsi@balabit.hu>
Subject: RE: [Syslog] delineated datagrams
References: <00f801c6af25$a5423c30$8c0c6f0a@china.huawei.com> <Pine.GSO.4.63.0608040708180.13343@sjc-cde-003.cisco.com> <44D89525.37FF.0081.0@novell.com> <1155109610.6312.10.camel@bzorp.balabit>
In-Reply-To: <1155109610.6312.10.camel@bzorp.balabit>
Mime-Version: 1.0
Content-Type: text/plain; charset="US-ASCII"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
X-Spam-Score: -2.3 (--)
X-Scan-Signature: 7aafa0432175920a4b3e118e16c5cb64
Cc: syslog@ietf.org, 'Tom Petch' <nwnetworks@dial.pipex.com>
X-BeenThere: syslog@lists.ietf.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Security Issues in Network Event Logging <syslog.lists.ietf.org>
List-Unsubscribe: <https://www1.ietf.org/mailman/listinfo/syslog>, <mailto:syslog-request@lists.ietf.org?subject=unsubscribe>
List-Archive: <http://www1.ietf.org/pipermail/syslog>
List-Post: <mailto:syslog@lists.ietf.org>
List-Help: <mailto:syslog-request@lists.ietf.org?subject=help>
List-Subscribe: <https://www1.ietf.org/mailman/listinfo/syslog>, <mailto:syslog-request@lists.ietf.org?subject=subscribe>
Errors-To: syslog-bounces@lists.ietf.org

Bazsi,

Thanks. You're right of course. I've been considering using a
compressed form of XML for our messages anyway because I don't like the
chatty nature of XML in a logging protocol. One compression technique is
as simple as removing all of the \r\n\t and space characters, and then
removing the closing tag names (eg., </done> becomes </>) as parsers
don't need the tag name in the close tag anyway. This alone would solve
a few problems.

John

>>> Balazs Scheidler <bazsi@balabit.hu> 8/9/2006 1:46 AM >>>
On Tue, 2006-08-08 at 13:44 -0600, John Calcote wrote:
> Chris,
> 
> While I agree with you in principle that both forms of delineation
are
> nice to have for interop, I _wish_ we could get rid of LF - that so
> limits the sort of data that can be sent in the message. My two
> cents...

The message you send are _already_ limited as most syslog daemons
replace "\n" character with something else as it would clobber the
message file when it is written to disk. 

In fact leaving the CR LF characters in the message could be a
security
risk as that way messages can be "hidden", for instance if a daemon
writes the following message:

This is a foo message, bar=<data supplied by external entity>

Then the value for "bar" might contain CR, putting the cursor to the
beginning of the line on a usual VT100 compatible terminal, and the
rest
of can pose as a regular log message, overwriting the previous one on
the screen.

Of course this can be worked around by using some form of escaping
while
data is written to files, but again the LF character does not remain
intact.

syslog-ng for instance replaces CR and LF characters in the message
with
a space as it comes in. I rarely heard any complaints about this
behaviour. And another fact is syslog/RAW also uses LF line
terminators
when multiple messages are delivered in a single BEEP frame.

-- 
Bazsi


_______________________________________________
Syslog mailing list
Syslog@lists.ietf.org
https://www1.ietf.org/mailman/listinfo/syslog