Initial Commit
- initial default booting image
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
From 07b3c40a5a78c79ed9109251f842ca7e955dd586 Mon Sep 17 00:00:00 2001
|
||||
From: Rainer Gerhards <rgerhards@adiscon.com>
|
||||
Date: Mon, 20 Jul 2026 17:19:28 +0200
|
||||
Subject: [PATCH] imptcp: guard regex framing match at line start
|
||||
|
||||
Why
|
||||
A regex match at the beginning of the receive buffer can form a
|
||||
negative message length after oversize-frame recovery.
|
||||
|
||||
Impact
|
||||
Regex-framed imptcp listeners reject that invalid transition instead
|
||||
of submitting a negative message length.
|
||||
|
||||
Before/After
|
||||
Before: a match with a zero line offset submitted an invalid length.
|
||||
After: only a match following an existing line can submit a frame.
|
||||
|
||||
Technical Overview
|
||||
Mirror the line-offset guard used by the shared imtcp parser.
|
||||
Leave existing regex framing and oversize recovery behavior unchanged.
|
||||
|
||||
Security advisory:
|
||||
https://github.com/rsyslog/rsyslog/security/advisories/GHSA-cj5r-wh2m-7w29
|
||||
|
||||
Reported-by: Raphael Eikenberg (@eikendev)
|
||||
With the help of AI-Agents: Codex
|
||||
---
|
||||
CVE: CVE-2026-19654
|
||||
Upstream: https://github.com/rsyslog/rsyslog/commit/07b3c40a5a78c79ed9109251f842ca7e955dd586
|
||||
Signed-off-by: Thomas Perale <thomas.perale@mind.be
|
||||
---
|
||||
plugins/imptcp/imptcp.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/plugins/imptcp/imptcp.c b/plugins/imptcp/imptcp.c
|
||||
index 838e1648fc..90a7d6f7ed 100644
|
||||
--- a/plugins/imptcp/imptcp.c
|
||||
+++ b/plugins/imptcp/imptcp.c
|
||||
@@ -1009,7 +1009,7 @@ static rsRetVal ATTR_NONNULL() processDataRcvd_regexFraming(ptcpsess_t *const __
|
||||
pThis->iCurrLine = pThis->iMsg;
|
||||
} else {
|
||||
const int isMatch = !regexec(&inst->start_preg, (char *)pThis->pMsg + pThis->iCurrLine, 0, NULL, 0);
|
||||
- if (isMatch) {
|
||||
+ if (pThis->iCurrLine > 0 && isMatch) {
|
||||
DBGPRINTF("regex match (%d), framing line: %s\n", pThis->iCurrLine, pThis->pMsg);
|
||||
strcpy((char *)pThis->pMsg_save, (char *)pThis->pMsg + pThis->iCurrLine);
|
||||
pThis->iMsg = pThis->iCurrLine - 1;
|
||||
36
package/rsyslog/Config.in
Normal file
36
package/rsyslog/Config.in
Normal file
@@ -0,0 +1,36 @@
|
||||
config BR2_PACKAGE_RSYSLOG
|
||||
bool "rsyslog"
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS
|
||||
depends on BR2_USE_MMU # fork()
|
||||
depends on !BR2_STATIC_LIBS # modules
|
||||
# Propagate the exact same dependency from libfastjson,
|
||||
# even though rsyslog already depends on threads for itself:
|
||||
depends on BR2_TOOLCHAIN_HAS_SYNC_4 || BR2_TOOLCHAIN_HAS_THREADS
|
||||
depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
|
||||
select BR2_PACKAGE_APR_UTIL if BR2_PACKAGE_CIVETWEB_LIB
|
||||
select BR2_PACKAGE_ZLIB
|
||||
select BR2_PACKAGE_LIBESTR
|
||||
select BR2_PACKAGE_LIBLOGGING
|
||||
select BR2_PACKAGE_LIBFASTJSON
|
||||
help
|
||||
Rsyslog is a powerful and flexible syslog implementation
|
||||
|
||||
http://www.rsyslog.com
|
||||
|
||||
if BR2_PACKAGE_RSYSLOG
|
||||
|
||||
config BR2_PACKAGE_RSYSLOG_EXTRA_PLUGINS
|
||||
bool "extra plugins"
|
||||
default y
|
||||
help
|
||||
Enable rsyslog plugins that require external
|
||||
dependencies. The different plugins will be automatically
|
||||
enabled if their dependencies are enabled.
|
||||
|
||||
endif # BR2_PACKAGE_RSYSLOG
|
||||
|
||||
comment "rsyslog needs a toolchain w/ threads, dynamic library"
|
||||
depends on BR2_USE_MMU
|
||||
depends on BR2_TOOLCHAIN_HAS_SYNC_4
|
||||
depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS
|
||||
depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
|
||||
53
package/rsyslog/S01rsyslogd
Normal file
53
package/rsyslog/S01rsyslogd
Normal file
@@ -0,0 +1,53 @@
|
||||
#!/bin/sh
|
||||
|
||||
DAEMON="rsyslogd"
|
||||
PIDFILE="/var/run/$DAEMON.pid"
|
||||
|
||||
RSYSLOGD_ARGS=""
|
||||
|
||||
# shellcheck source=/dev/null
|
||||
[ -r "/etc/default/$DAEMON" ] && . "/etc/default/$DAEMON"
|
||||
|
||||
start() {
|
||||
printf 'Starting %s: ' "$DAEMON"
|
||||
# shellcheck disable=SC2086 # we need the word splitting
|
||||
start-stop-daemon -S -q -p "$PIDFILE" -x "/usr/sbin/$DAEMON" \
|
||||
-- $RSYSLOGD_ARGS
|
||||
status=$?
|
||||
if [ "$status" -eq 0 ]; then
|
||||
echo "OK"
|
||||
else
|
||||
echo "FAIL"
|
||||
fi
|
||||
return "$status"
|
||||
}
|
||||
|
||||
stop() {
|
||||
printf 'Stopping %s: ' "$DAEMON"
|
||||
start-stop-daemon -K -q -p "$PIDFILE"
|
||||
status=$?
|
||||
if [ "$status" -eq 0 ]; then
|
||||
echo "OK"
|
||||
else
|
||||
echo "FAIL"
|
||||
fi
|
||||
return "$status"
|
||||
}
|
||||
|
||||
restart() {
|
||||
stop
|
||||
sleep 1
|
||||
start
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start|stop|restart)
|
||||
"$1";;
|
||||
reload)
|
||||
# Restart, since there is no true "reload" feature (does not
|
||||
# reconfigure/restart on SIGHUP, just closes all open files).
|
||||
restart;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart|reload}"
|
||||
exit 1
|
||||
esac
|
||||
7
package/rsyslog/rsyslog.hash
Normal file
7
package/rsyslog/rsyslog.hash
Normal file
@@ -0,0 +1,7 @@
|
||||
# From http://www.rsyslog.com/downloads/download-v8-stable/
|
||||
sha256 a70a9834186859539a6a4d1c7b3f68c23897e805829b764a45e92cb0cc95e66a rsyslog-8.2510.0.tar.gz
|
||||
|
||||
# Locally calculated
|
||||
sha256 054b3a047d9232376a46b87356b19b0c0c2924cb5e6911ab96a01fc4b515f083 COPYING
|
||||
sha256 8743ad560dea1229d4f46cd603e10874db41a27f3c74f64e958ef123f3943fab COPYING.ASL20
|
||||
sha256 4038442ca5bde8ffd243cfc235cb4455e7d618d47558ea3d8284733f71d904ed COPYING.LESSER
|
||||
181
package/rsyslog/rsyslog.mk
Normal file
181
package/rsyslog/rsyslog.mk
Normal file
@@ -0,0 +1,181 @@
|
||||
################################################################################
|
||||
#
|
||||
# rsyslog
|
||||
#
|
||||
################################################################################
|
||||
|
||||
RSYSLOG_VERSION = 8.2510.0
|
||||
RSYSLOG_SITE = http://rsyslog.com/files/download/rsyslog
|
||||
RSYSLOG_LICENSE = GPL-3.0, LGPL-3.0, Apache-2.0
|
||||
RSYSLOG_LICENSE_FILES = COPYING COPYING.LESSER COPYING.ASL20
|
||||
RSYSLOG_CPE_ID_VENDOR = rsyslog
|
||||
RSYSLOG_DEPENDENCIES = zlib libestr liblogging libfastjson host-pkgconf
|
||||
RSYSLOG_CONF_ENV = ac_cv_prog_cc_c99='-std=c99'
|
||||
|
||||
# 0001-imptcp-guard-regex-framing-match-at-line-start.patch
|
||||
RSYSLOG_IGNORE_CVES += CVE-2026-19654
|
||||
|
||||
ifeq ($(BR2_PACKAGE_RSYSLOG_EXTRA_PLUGINS),y)
|
||||
RSYSLOG_PLUGINS = imdiag imfile impstats imptcp \
|
||||
mmanon mmaudit mmfields mmjsonparse mmpstrucdata mmsequence mmutf8fix \
|
||||
mail omprog omruleset omstdout omuxsock \
|
||||
pmaixforwardedfrom pmciscoios pmcisconames pmlastmsg pmsnare
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBRELP)$(BR2_PACKAGE_RSYSLOG_EXTRA_PLUGINS),yy)
|
||||
RSYSLOG_DEPENDENCIES += librelp
|
||||
RSYSLOG_PLUGINS += relp
|
||||
endif
|
||||
|
||||
RSYSLOG_CONF_OPTS = --disable-generate-man-pages \
|
||||
$(foreach x,$(call qstrip,$(RSYSLOG_PLUGINS)),--enable-$(x))
|
||||
|
||||
# Disable items requiring lognorm
|
||||
RSYSLOG_CONF_OPTS += \
|
||||
--disable-mmkubernetes \
|
||||
--disable-mmnormalize
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBCURL)$(BR2_PACKAGE_RSYSLOG_EXTRA_PLUGINS),yy)
|
||||
RSYSLOG_DEPENDENCIES += libcurl
|
||||
RSYSLOG_CONF_OPTS += \
|
||||
--enable-clickhouse \
|
||||
--enable-elasticsearch \
|
||||
--enable-fmhttp \
|
||||
--enable-imdocker \
|
||||
--enable-omhttp \
|
||||
--enable-omhttpfs
|
||||
else
|
||||
RSYSLOG_CONF_OPTS += \
|
||||
--disable-clickhouse \
|
||||
--disable-elasticsearch \
|
||||
--disable-fmhttp \
|
||||
--disable-imdocker \
|
||||
--disable-omhttp \
|
||||
--disable-omhttpfs
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_CIVETWEB_LIB)$(BR2_PACKAGE_RSYSLOG_EXTRA_PLUGINS),yy)
|
||||
RSYSLOG_DEPENDENCIES += apr-util civetweb
|
||||
RSYSLOG_CONF_OPTS += --enable-imhttp
|
||||
else
|
||||
RSYSLOG_CONF_OPTS += --disable-imhttp
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_CZMQ)$(BR2_PACKAGE_RSYSLOG_EXTRA_PLUGINS),yy)
|
||||
RSYSLOG_DEPENDENCIES += czmq
|
||||
RSYSLOG_CONF_OPTS += --enable-imczmq --enable-omczmq
|
||||
else
|
||||
RSYSLOG_CONF_OPTS += --disable-imczmq --disable-omczmq
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_GNUTLS)$(BR2_PACKAGE_RSYSLOG_EXTRA_PLUGINS),yy)
|
||||
RSYSLOG_DEPENDENCIES += gnutls
|
||||
RSYSLOG_CONF_OPTS += --enable-gnutls
|
||||
else
|
||||
RSYSLOG_CONF_OPTS += --disable-gnutls
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_HIREDIS)$(BR2_PACKAGE_RSYSLOG_EXTRA_PLUGINS),yy)
|
||||
RSYSLOG_DEPENDENCIES += hiredis
|
||||
RSYSLOG_CONF_OPTS += --enable-omhiredis
|
||||
else
|
||||
RSYSLOG_CONF_OPTS += --disable-omhiredis
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBGCRYPT)$(BR2_PACKAGE_RSYSLOG_EXTRA_PLUGINS),yy)
|
||||
RSYSLOG_DEPENDENCIES += libgcrypt
|
||||
RSYSLOG_CONF_ENV += LIBGCRYPT_CONFIG=$(STAGING_DIR)/usr/bin/libgcrypt-config
|
||||
RSYSLOG_CONF_OPTS += --enable-libgcrypt
|
||||
else
|
||||
RSYSLOG_CONF_OPTS += --disable-libgcrypt
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBMAXMINDDB)$(BR2_PACKAGE_RSYSLOG_EXTRA_PLUGINS),yy)
|
||||
RSYSLOG_DEPENDENCIES += libmaxminddb
|
||||
RSYSLOG_CONF_OPTS += --enable-mmdblookup
|
||||
else
|
||||
RSYSLOG_CONF_OPTS += --disable-mmdblookup
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBPCAP)$(BR2_PACKAGE_RSYSLOG_EXTRA_PLUGINS),yy)
|
||||
RSYSLOG_DEPENDENCIES += libpcap
|
||||
RSYSLOG_CONF_OPTS += --enable-impcap
|
||||
else
|
||||
RSYSLOG_CONF_OPTS += --disable-impcap
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_MARIADB)$(BR2_PACKAGE_RSYSLOG_EXTRA_PLUGINS),yy)
|
||||
RSYSLOG_DEPENDENCIES += mariadb
|
||||
RSYSLOG_CONF_OPTS += --enable-mysql
|
||||
RSYSLOG_CONF_ENV += ac_cv_prog_MYSQL_CONFIG=$(STAGING_DIR)/usr/bin/mysql_config
|
||||
else
|
||||
RSYSLOG_CONF_OPTS += --disable-mysql
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_POSTGRESQL)$(BR2_PACKAGE_RSYSLOG_EXTRA_PLUGINS),yy)
|
||||
RSYSLOG_DEPENDENCIES += postgresql
|
||||
RSYSLOG_CONF_OPTS += --enable-pgsql
|
||||
RSYSLOG_CONF_ENV += ac_cv_prog_PG_CONFIG=$(STAGING_DIR)/usr/bin/pg_config
|
||||
else
|
||||
RSYSLOG_CONF_OPTS += --disable-pgsql
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_QPID_PROTON)$(BR2_PACKAGE_RSYSLOG_EXTRA_PLUGINS),yy)
|
||||
RSYSLOG_DEPENDENCIES += qpid-proton
|
||||
RSYSLOG_CONF_OPTS += --enable-omamqp1
|
||||
else
|
||||
RSYSLOG_CONF_OPTS += --disable-omamqp1
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_RABBITMQ_C)$(BR2_PACKAGE_RSYSLOG_EXTRA_PLUGINS),yy)
|
||||
RSYSLOG_DEPENDENCIES += rabbitmq-c
|
||||
RSYSLOG_CONF_OPTS += --enable-omrabbitmq
|
||||
else
|
||||
RSYSLOG_CONF_OPTS += --disable-omrabbitmq
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBUUID)$(BR2_PACKAGE_RSYSLOG_EXTRA_PLUGINS),yy)
|
||||
RSYSLOG_DEPENDENCIES += util-linux
|
||||
RSYSLOG_CONF_OPTS += --enable-uuid
|
||||
else
|
||||
RSYSLOG_CONF_OPTS += --disable-uuid
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_INIT_SYSTEMD)$(BR2_PACKAGE_RSYSLOG_EXTRA_PLUGINS),yy)
|
||||
RSYSLOG_CONF_OPTS += \
|
||||
--enable-imjournal \
|
||||
--enable-omjournal \
|
||||
--with-systemdsystemunitdir=/usr/lib/systemd/system
|
||||
RSYSLOG_DEPENDENCIES += systemd
|
||||
else
|
||||
RSYSLOG_CONF_OPTS += \
|
||||
--disable-imjournal \
|
||||
--disable-omjournal
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBDBI_DRIVERS)$(BR2_PACKAGE_RSYSLOG_EXTRA_PLUGINS),yy)
|
||||
RSYSLOG_CONF_OPTS += --enable-libdbi
|
||||
RSYSLOG_DEPENDENCIES += libdbi-drivers
|
||||
else
|
||||
RSYSLOG_CONF_OPTS += --disable-libdbi
|
||||
endif
|
||||
|
||||
define RSYSLOG_INSTALL_INIT_SYSTEMD
|
||||
$(INSTALL) -m 0644 -D package/rsyslog/rsyslog.service \
|
||||
$(TARGET_DIR)/usr/lib/systemd/system/rsyslog.service
|
||||
endef
|
||||
|
||||
define RSYSLOG_INSTALL_INIT_SYSV
|
||||
$(INSTALL) -m 0755 -D package/rsyslog/S01rsyslogd \
|
||||
$(TARGET_DIR)/etc/init.d/S01rsyslogd
|
||||
endef
|
||||
|
||||
define RSYSLOG_INSTALL_CONF
|
||||
$(INSTALL) -m 0644 -D $(@D)/platform/redhat/rsyslog.conf \
|
||||
$(TARGET_DIR)/etc/rsyslog.conf
|
||||
mkdir -p $(TARGET_DIR)/etc/rsyslog.d
|
||||
endef
|
||||
|
||||
RSYSLOG_POST_INSTALL_TARGET_HOOKS += RSYSLOG_INSTALL_CONF
|
||||
|
||||
$(eval $(autotools-package))
|
||||
19
package/rsyslog/rsyslog.service
Normal file
19
package/rsyslog/rsyslog.service
Normal file
@@ -0,0 +1,19 @@
|
||||
[Unit]
|
||||
Description=System Logging Service
|
||||
Requires=syslog.socket
|
||||
Documentation=man:rsyslogd(8)
|
||||
Documentation=https://www.rsyslog.com/doc/
|
||||
|
||||
[Service]
|
||||
Type=notify
|
||||
ExecStart=/usr/sbin/rsyslogd -n -iNONE
|
||||
StandardOutput=null
|
||||
Restart=on-failure
|
||||
|
||||
# Increase the default a bit in order to allow many simultaneous
|
||||
# files to be monitored, we might need a lot of fds.
|
||||
LimitNOFILE=16384
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Alias=syslog.service
|
||||
Reference in New Issue
Block a user