Reach pcre2 · 8 builds in 4 of 4 releases
full reviewcross-check✓ a member decided
Description · NVD
In PCRE2 before 10.48, pcre2_jit_match mishandles a previously copied subject being passed in as a context. An incorrect free operation can occur.
Published 2026-09-11NVD
CVSS 3.1Local · low privileges · no user interaction
How it is reached
- Attack vector
- Local
- Attack complexity
- Low
- Privileges required
- Low
- User interaction
- None
What it costs
- Confidentiality
- High
- Integrity
- High
- Availability
- High
- Scope
- Unchanged
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Fable 5.1 · high confidence · 2026-11-05
CVE-2026-89161 is a bad free in pcre2_jit_match() when a match_data block previously used with PCRE2_COPY_MATCHED_SUBJECT is reused; the vulnerable logic lives entirely inside the SUPPORT_JIT branch of that function.
This build configures pcre2 with --disable-jit (BR2_PACKAGE_PCRE2_JIT unset), so SUPPORT_JIT is undefined and pcre2_jit_match() compiles to a stub returning PCRE2_ERROR_JIT_BADOPTION. The source is vanilla 10.46 with no fix backported, but the affected code is not compiled into the target (or host) library.
Document as not applicable; pick up 10.48 at the next routine bump and re-evaluate if JIT is ever enabled.
Evidence 9
BR2_PACKAGE_PCRE2_JIT unset → configure receives --disable-jit
buildroot/package/pcre2/pcre2.mk:23-27
BR2_PACKAGE_PCRE2_JIT is not set for the target build
output/.config:3060-3061
Actual configure invocation includes --disable-jit
output/build/pcre2-10.46/config.log:7
/* #undef SUPPORT_JIT */ — JIT not compiled in the target library
output/build/pcre2-10.46/src/config.h:310
Without SUPPORT_JIT, pcre2_jit_match() is a stub that returns PCRE2_ERROR_JIT_BADOPTION; the vulnerable body (lines 106-197, which assigns match_data->subject without handling PCRE2_MD_COPIED_SUBJECT) is excluded by #else
output/build/pcre2-10.46/src/pcre2_jit_match.c:95-105
The compiled, non-JIT pcre2_match() path correctly frees and clears a previously copied subject
output/build/pcre2-10.46/src/pcre2_match.c:6982-6990
Host pcre2 build also has SUPPORT_JIT undefined (and is not shipped in the image)
output/build/host-pcre2-10.46/src/config.h:310
No patches applied; source is vanilla 10.46 without the 10.48 fix (irrelevant since the code is not compiled)
output/build/pcre2-10.46/.applied_patches_list + buildroot/package/pcre2/
pcre2 is selected as a library dependency of libyang and libglib2
output/.config:2740,2919
Version and patches
NVD range: PCRE2 before 10.48; fixed in 10.48 via PCRE2Project/pcre2 PR #937. Tree has 10.46 (src/pcre2.h:44-45), no patches applied, fix not present. Vulnerable function body is compiled only under SUPPORT_JIT, which is undefined in both target and host builds.
Recommendation
Document as N/A (JIT not compiled; pcre2_jit_match is a no-op stub). Upgrade to pcre2 10.48 at the next routine Buildroot bump. If BR2_PACKAGE_PCRE2_JIT is ever enabled, this CVE becomes applicable and the upgrade becomes mandatory.
Open questions
The GitHub PR #937 diff could not be fetched from this environment; the mapping of the CVE to the JIT-only body of pcre2_jit_match() is based on the CVE text and the 10.46 source, which show the non-JIT stub performs no memory operations at all.
Members of Kernel Kit decide. Sign in if you are one.