Backport upstream patch fixing CVE-2026-59858, where a
crafted tags file could execute arbitrary Ex commands during
C omni-completion (struct/union member completion via
ccomplete.vim).
Patch 1 (upstream 6b611b0d) escapes the typeref field with
escape(typename, '/\') before interpolating it into the
:vimgrep pattern.
Patch is adapted to the legacy Vimscript style used
in the RHEL 8.2 codebase. A new test file
test_plugin_ccomplete.vim is added covering both injection
vectors and normal typeref completion.
CVE: CVE-2026-59858
Upstream patches:
- 6b611b0d15.patch
Resolves: RHEL-203984
This commit was backported by Ymir, a Red Hat Enterprise Linux software maintenance AI agent.
Assisted-by: Ymir