syslog-ng: patch CVE-2026-39879
PATCH 1/1 syslog-ng: patch CVE-2026-39879
From: Peter Marko <[email protected]>
Pick patches per [1].
[1] https://security-tracker.debian.org/tracker/CVE-2026-39879
Signed-off-by Peter Marko <[email protected]>
--- .../syslog-ng/files/CVE-2026-39879-01.patch | 65 ++ .../syslog-ng/files/CVE-2026-39879-02.patch | 572 +++++++++++++ .../syslog-ng/files/CVE-2026-39879-03.patch | 758 ++++++++++++++++++ .../syslog-ng/files/CVE-2026-39879-04.patch | 176 ++++ .../syslog-ng/syslog-ng_4.11.0.bb | 4 + 5 files changed, 1575 insertions(+) create mode 100644 meta-oe/recipes-support/syslog-ng/files/CVE-2026-39879-01.patch create mode 100644 meta-oe/recipes-support/syslog-ng/files/CVE-2026-39879-02.patch create mode 100644 meta-oe/recipes-support/syslog-ng/files/CVE-2026-39879-03.patch create mode 100644 meta-oe/recipes-support/syslog-ng/files/CVE-2026-39879-04.patch
meta-oe/recipes-support/syslog-ng/files/CVE-2026-39879-01.patch new file +65 -0
@@ -0,0 +1,65 @@ +From 1e872e301436efa5d3fcd54e7628ac82c57698d2 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?B=C3=A1lint=20Horv=C3=A1th?= <[email protected]> +Date: Tue, 7 Apr 2026 14:40:17 +0200 +Subject: [PATCH] afsql: Fixed SQL injection bug +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Bálint Horváth <[email protected]> +Signed-off-by: Hofi <[email protected]> + +CVE: CVE-2026-39879 +Upstream-Status: Backport [https://github.com/syslog-ng/syslog-ng/commit/1e872e301436efa5d3fcd54e7628ac82c57698d2] +Signed-off-by: Peter Marko <[email protected]> +--- + modules/afsql/afsql.c | 12 +++++++++--- + 1 file changed, 9 insertions(+), 3 deletions(-) + +diff --git a/modules/afsql/afsql.c b/modules/afsql/afsql.c +index be59a2352..fb7ef3b32 100644 +--- a/modules/afsql/afsql.c ++++ b/modules/afsql/afsql.c +@@ -36,6 +36,8 @@ + + #include <string.h> + #include <errno.h> ++#include <utf8utils.h> ++ + #include "compat/openssl_support.h" + #include <openssl/evp.h> + +@@ -219,11 +221,12 @@ static gboolean + afsql_dd_run_query(AFSqlDestDriver *self, const gchar *query, gboolean silent, dbi_result *result) + { + dbi_result db_res; ++ gchar* escaped_query = convert_unsafe_utf8_to_escaped_text(query, -1, 0); + + msg_debug("Running SQL query", +- evt_tag_str("query", query)); ++ evt_tag_str("query", escaped_query)); + +- db_res = dbi_conn_query(self->dbi_ctx, query); ++ db_res = dbi_conn_query(self->dbi_ctx, escaped_query); + if (!db_res) + { + const gchar *dbi_error; +@@ -238,14 +241,17 @@ afsql_dd_run_query(AFSqlDestDriver *self, const gchar *query, gboolean silent, d + evt_tag_str("user", self->user), + evt_tag_str("database", self->database), + evt_tag_str("error", dbi_error), +- evt_tag_str("query", query)); ++ evt_tag_str("query", query), ++ evt_tag_str("escaped_query", escaped_query)); + } ++ g_free(escaped_query); + return FALSE; + } + if (result) + *result = db_res; + else + dbi_result_free(db_res); ++ g_free(escaped_query); + return TRUE; + } +
meta-oe/recipes-support/syslog-ng/files/CVE-2026-39879-02.patch new file +572 -0
572 lines not on this page · raw message
meta-oe/recipes-support/syslog-ng/files/CVE-2026-39879-03.patch new file +758 -0
758 lines not on this page · raw message
meta-oe/recipes-support/syslog-ng/files/CVE-2026-39879-04.patch new file +176 -0
176 lines not on this page · raw message
meta-oe/recipes-support/syslog-ng/syslog-ng_4.11.0.bb +4 -0
@@ -23,6 +23,10 @@ SRC_URI = "https://github.com/balabit/syslog-ng/releases/download/${BP}/${BP}.ta file://syslog-ng-tmp.conf \ file://syslog-ng.service-the-syslog-ng-service.patch \ file://0001-Fix-buildpaths-warning.patch \ + file://CVE-2026-39879-01.patch \ + file://CVE-2026-39879-02.patch \ + file://CVE-2026-39879-03.patch \ + file://CVE-2026-39879-04.patch \ " SRC_URI:append:powerpc64le = " file://0001-plugin.c-workaround-powerpc64le-segfaults-error.patch"