From 5d1e62b0155292b994aa1c96d4ed8ce4346ef4c2 Mon Sep 17 00:00:00 2001 From: Zoltan Herczeg Date: Thu, 24 Mar 2022 05:34:42 +0000 Subject: [PATCH] Fix incorrect value reading in JIT. CVE: CVE-2022-1586 Upstream-Status: Backport [https://github.com/PCRE2Project/pcre2/commit/d4fa336fbcc3] (cherry picked from commit d4fa336fbcc388f89095b184ba6d99422cfc676c) Signed-off-by: Shinu Chandran --- src/pcre2_jit_compile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pcre2_jit_compile.c b/src/pcre2_jit_compile.c index 493c96d..fa57942 100644 --- a/src/pcre2_jit_compile.c +++ b/src/pcre2_jit_compile.c @@ -7188,7 +7188,7 @@ while (*cc != XCL_END) { SLJIT_ASSERT(*cc == XCL_PROP || *cc == XCL_NOTPROP); cc++; - if (*cc == PT_CLIST && *cc == XCL_PROP) + if (*cc == PT_CLIST && cc[-1] == XCL_PROP) { other_cases = PRIV(ucd_caseless_sets) + cc[1]; while (*other_cases != NOTACHAR) -- 2.25.1