snort3: upgrade 3.9.7.0 -> 3.12.2.0

Bump to the latest snort3 release. Drop
0001-Fix-build-on-c23.patch: the once_flag/call_once C23 name-collision
fix it carried (submitted upstream as snort3 PR #431) is now merged
verbatim upstream (src/loggers/alert_fast.cc already uses
std::once_flag/std::call_once as of this tag), and the patch fails to
apply (reversed/already-applied) against 3.12.2.0.

Keep 0001-cmake-Check-for-HP-libunwind.patch (applies cleanly) and
0001-cmake-Pass-noline-flag-to-flex.patch (applies with offset only,
no fuzz) unchanged.

The ~180 commits between the old and new SRCREV include several
crash/security fixes (use-after-free, heap-buffer-overflow,
null-deref) that are picked up naturally by this version bump.

Build-verified with cleansstate + full build for qemux86-64.

AI-Generated: Uses Claude Code
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
This commit is contained in:
Khem Raj
2026-08-06 12:57:52 +00:00
parent 073acc4f58
commit 21f8669e61
2 changed files with 1 additions and 45 deletions
@@ -1,43 +0,0 @@
From ae5566a7df4851bd47081ef0e00e2a0513b7f331 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 10 Nov 2025 19:41:16 -0800
Subject: [PATCH] Fix build on c23
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
C23/glibc is now including once_init in stdlib.h
https://patchwork.sourceware.org/project/glibc/patch/78061085-f04a-0c45-107b-5a8a15521083@redhat.com/#213088
This is a name collision with the new C once_flag/call_once that
glibc exposes (via <stdlib.h>) and C++s std::once_flag/std::call_once
Upstream-Status: Submitted [https://github.com/snort3/snort3/pull/431]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
src/loggers/alert_fast.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/loggers/alert_fast.cc b/src/loggers/alert_fast.cc
index 7b5deab2..3f88bff6 100644
--- a/src/loggers/alert_fast.cc
+++ b/src/loggers/alert_fast.cc
@@ -53,7 +53,7 @@ using namespace std;
#define FAST_BUF (4*K_BYTES)
static THREAD_LOCAL TextLog* fast_log = nullptr;
-static once_flag init_flag;
+static std::once_flag init_flag;
#define S_NAME "alert_fast"
#define F_NAME S_NAME ".txt"
@@ -319,7 +319,7 @@ void FastLogger::set_buffer_ids(Inspector* gadget)
const BufferIds& FastLogger::get_buffer_ids(Inspector* gadget, Packet* p)
{
// lazy init required because loggers don't have a configure (yet)
- call_once(init_flag, set_buffer_ids, gadget);
+ std::call_once(init_flag, set_buffer_ids, gadget);
InspectionBuffer buf;
const std::vector<unsigned>& idv =
@@ -10,10 +10,9 @@ DEPENDS = "flex-native hwloc libdaq libdnet libpcap libpcre libtirpc libunwind l
SRC_URI = "git://github.com/snort3/snort3.git;protocol=https;branch=master;tag=${PV} \
file://0001-cmake-Check-for-HP-libunwind.patch \
file://0001-cmake-Pass-noline-flag-to-flex.patch \
file://0001-Fix-build-on-c23.patch \
"
SRCREV = "892f9f3b04d604797851d60e89d6cfe640a047cd"
SRCREV = "14aeb09f5a0856812dbe08ead3c21f99e8860aa0"
PACKAGES =+ "${PN}-scripts"