]> git.kaiwu.me - haproxy.git/commit
BUG/MINOR: cfgcond: fail cleanly on missing argument for "feature"
authorWilly Tarreau <w@1wt.eu>
Fri, 3 Apr 2026 07:17:35 +0000 (09:17 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 3 Apr 2026 07:17:35 +0000 (09:17 +0200)
commitefb1ab57bea888491c31b0c534a0e1d96823c5da
treefcf17f246bc25381d3b5fae068f8c658cb2ed331
parentf9ba750fd921f6696483c23c8b3cadb072f9e86f
BUG/MINOR: cfgcond: fail cleanly on missing argument for "feature"

The "feature" predicate takes an argument name. Not passing one will
cause strstr() to always find something, including at the end of the
string, and to read past end that ASAN detects. We need to check that
we didn't reach end before proceeding.

This bug was reported by OSS Fuzz here:
   https://issues.oss-fuzz.com/issues/499133314

The issue is present since 2.4 with commit 58ca706e16 ("MINOR: config:
add predicate "feature" to detect certain built-in features") so this
fix must be backported to all stable versions.
src/cfgcond.c