2011-09-05 14:24:08 -04:00
|
|
|
$OpenBSD: patch-tools_syslogd_c,v 1.2 2011/09/05 18:24:08 jasper Exp $
|
|
|
|
|
|
|
|
Last chunk:
|
|
|
|
Security fix for CVE-2011-3200,
|
|
|
|
rsyslog: parseLegacySyslogMsg off-by-two buffer overflow
|
|
|
|
|
|
|
|
Patch from upstream via redhat: https://bugzilla.redhat.com/show_bug.cgi?id=727644
|
|
|
|
|
|
|
|
--- tools/syslogd.c.orig Thu Aug 5 11:33:54 2010
|
|
|
|
+++ tools/syslogd.c Mon Sep 5 20:22:07 2011
|
import rsyslog-4.6.3
Rsyslog is an enhanced multi-threaded syslogd with a focus on
security and reliability. Among others, it offers support for
on-demand disk buffering, reliable syslog over TCP, SSL, TLS and
RELP, writing to databases (MySQL, PostgreSQL, Oracle, and many
more), email alerting, fully configurable output formats (including
high-precision timestamps), the ability to filter on any part of
the syslog message, on-the-wire message compression, and the ability
to convert text files to syslog. It is a drop-in replacement for
stock syslogd and able to work with the same configuration file
syntax. Its advanced features make it suitable for enterprise-class,
encryption protected syslog relay chains while at the same time
being very easy to setup for the novice user.
initial port from todd@, improved by sthen@ and me
2010-07-29 17:40:21 -04:00
|
|
|
@@ -173,9 +173,8 @@ static rsRetVal GlobalClassExit(void);
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
-#ifndef _PATH_LOGCONF
|
|
|
|
-#define _PATH_LOGCONF "/etc/rsyslog.conf"
|
|
|
|
-#endif
|
|
|
|
+#undef _PATH_LOGCONF
|
|
|
|
+#define _PATH_LOGCONF CONFIGFILE
|
|
|
|
|
|
|
|
#ifndef _PATH_MODDIR
|
|
|
|
# if defined(__FreeBSD__)
|
2011-09-05 14:24:08 -04:00
|
|
|
@@ -1291,7 +1290,7 @@ int parseLegacySyslogMsg(msg_t *pMsg, int flags)
|
|
|
|
* outputs so that only 32 characters max are used by default.
|
|
|
|
*/
|
|
|
|
i = 0;
|
|
|
|
- while(lenMsg > 0 && *p2parse != ':' && *p2parse != ' ' && i < CONF_TAG_MAXSIZE) {
|
|
|
|
+ while(lenMsg > 0 && *p2parse != ':' && *p2parse != ' ' && i < CONF_TAG_MAXSIZE - 2) {
|
|
|
|
bufParseTAG[i++] = *p2parse++;
|
|
|
|
--lenMsg;
|
|
|
|
}
|