From d6521adf4e145ab065d80663bd8ab1e319c10aec Mon Sep 17 00:00:00 2001 From: Lukas Sismis Date: Thu, 27 Aug 2026 16:32:13 +0200 Subject: [PATCH] fw: allow pass as a secondary action only for accept Previously, hook sequences in both rules and default policies allowed `pass` to be combined with incompatible hooks (e.g. reject or drop). This commit clamps pass to accept only. Ticket: 8954 --- src/detect-parse.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/detect-parse.c b/src/detect-parse.c index a34276eca6..74502ba6f2 100644 --- a/src/detect-parse.c +++ b/src/detect-parse.c @@ -1822,6 +1822,10 @@ static int SigParseActionDo(const char *action_in, const int idx, const bool fw_ "rules"); return -1; } + if (idx > 0 && (flags & ACTION_PASS) && !(*action_out & ACTION_ACCEPT)) { + SCLogError("'pass' is only supported as a secondary action for 'accept'"); + return -1; + } } /* parse scope, if any */