Blame SOURCES/rsyslog-8.24.0-rhbz1656860-imfile-buffer-overflow.patch

ee3a35
From d5bcd5b89b2f88611e73ea193ce35178b1e89b32 Mon Sep 17 00:00:00 2001
ee3a35
From: Rainer Gerhards <rgerhards@adiscon.com>
ee3a35
Date: Tue, 19 Dec 2017 10:15:46 +0100
ee3a35
Subject: [PATCH] core bugfix: MAXFNAME was set too low
ee3a35
ee3a35
it just permitted 200 chars, with almost all systems permitting for
ee3a35
more. I tried to find a more portable way to find out the actual max,
ee3a35
but this turned out horrible. The next solution would have been to use
ee3a35
dynamic alloc, but that often is overkill. So I now settle to just
ee3a35
increasing the value to 4KiB. This is the Linux limit, and it is by
ee3a35
far the highest I could find. This should be good to go for quite
ee3a35
some while but should not put too much stressure on the stack alloc.
ee3a35
ee3a35
closes https://github.com/rsyslog/rsyslog/issues/2228
ee3a35
---
ee3a35
 runtime/syslogd-types.h | 4 ++--
ee3a35
 1 file changed, 2 insertions(+), 2 deletions(-)
ee3a35
ee3a35
diff --git a/runtime/syslogd-types.h b/runtime/syslogd-types.h
ee3a35
index 2cbe8039a..360f6d557 100644
ee3a35
--- a/runtime/syslogd-types.h
ee3a35
+++ b/runtime/syslogd-types.h
ee3a35
@@ -4,7 +4,7 @@
ee3a35
  *
ee3a35
  * File begun on 2007-07-13 by RGerhards (extracted from syslogd.c)
ee3a35
  *
ee3a35
- * Copyright 2007-2014 Adiscon GmbH.
ee3a35
+ * Copyright 2007-2017 Adiscon GmbH.
ee3a35
  *
ee3a35
  * This file is part of the rsyslog runtime library.
ee3a35
  *
ee3a35
@@ -38,7 +38,7 @@
ee3a35
 # define UNAMESZ	8	/* length of a login name */
ee3a35
 #endif
ee3a35
 #define MAXUNAMES	20	/* maximum number of user names */
ee3a35
-#define MAXFNAME	200	/* max file pathname length */
ee3a35
+#define MAXFNAME	4096	/* max file pathname length */
ee3a35
 
ee3a35
 #define	_DB_MAXDBLEN	128	/* maximum number of db */
ee3a35
 #define _DB_MAXUNAMELEN	128	/* maximum number of user name */