[syslog-ng] Reference counter width of log messages and group/user handling

Roger J. Meier r at tac.ch
Wed Feb 13 10:04:36 CET 2008


Hi all,

These patches fix two segmentation fault and abort signal problems
which we encountered in our use case of syslog-ng 2.0.8.

Patch 1: "syslog-ng-2.0.8-refcounter.diff".

If specifying more than about 256 "destination" directives inside one
log directive, then the reference counter of a log message wraps.

The reference counter width of LogMessage is expanded from 8 bit to
unsigned int (32 bit).  Reason: The reference counter wraps after 256
increments, which causes an abort() call when decrementing the reference
counter below 0 at a later time.  The additional 3 bytes per message in
memory seem to be affordable.

Patch 2: "syslog-ng-2.0.8-group.diff".

Handling of "-g" and "-u" options is not mutual exclusive: If group is
specified on the command line, but not the user, then the user is a NULL
pointer.  Calling initgroups() with a null pointer segfaults in our
case.

And once again, many thanks to Bazsi for the syslog-ng software.

-- Roger

-- 
---------------------------------------------------------------
addr://Kasinostrasse 30, CH-5001 Aarau   fon://++41 62 823 9355
http://www.terreactive.com               fax://++41 62 823 9356
---------------------------------------------------------------
Wir sichern Ihren Erfolg.                        terreActive AG
---------------------------------------------------------------
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: syslog-ng-2.0.8-refcounter.diff
Url: http://lists.balabit.hu/pipermail/syslog-ng/attachments/20080213/15443b99/attachment.txt 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: syslog-ng-2.0.8-group.diff
Url: http://lists.balabit.hu/pipermail/syslog-ng/attachments/20080213/15443b99/attachment-0001.txt 


More information about the syslog-ng mailing list