Skip to content

projects/vim: add OSS-Fuzz integration for Vim regex engine and Vimscript parser#15594

Open
XananasX7 wants to merge 4 commits into
google:masterfrom
XananasX7:add-vim-project
Open

projects/vim: add OSS-Fuzz integration for Vim regex engine and Vimscript parser#15594
XananasX7 wants to merge 4 commits into
google:masterfrom
XananasX7:add-vim-project

Conversation

@XananasX7

Copy link
Copy Markdown

Summary

Vim is a ubiquitous text editor installed on virtually every Unix system, with a long history of memory-safety CVEs. It currently has no OSS-Fuzz project.

The regex engine (regexp.c, regexp_bt.c, regexp_nfa.c) and Vimscript evaluator (eval.c) have been the source of numerous CVEs discovered by manual fuzzing in recent years, including:

Continuous fuzzing via OSS-Fuzz would catch these classes of bugs automatically.

Fuzz targets

fuzz_regexp

Splits input into a pattern and subject string, compiles the pattern with vim_regcomp(), and matches it against the subject with vim_regexec(). Covers both the backtracking engine (regexp_bt.c) and NFA engine (regexp_nfa.c), and all special regex syntax including backreferences, character classes, and look-around assertions.

fuzz_vimscript

Feeds arbitrary input to eval0() to exercise the Vimscript expression evaluator — variable access, function calls, operators, string/list/dict constructors.

Seed corpus

Valid regex pattern/subject pairs covering common patterns for guided mutation.

XananasX7 added 2 commits May 31, 2026 06:55
Redis is a widely-deployed Tier 1 in-memory data store used by millions
of applications. It currently has no OSS-Fuzz project. This PR adds:

Fuzz targets:
- fuzz_resp_parser: exercises the RESP3 protocol reply parser
  (src/resp_parser.c) with arbitrary network-like input. Covers all
  RESP3 type prefixes: simple strings, errors, integers, bulk strings,
  arrays, sets, maps, null, bool, double, big number, verbatim string,
  and attribute types.
- fuzz_rdb_load: exercises the RDB file parser (src/rdb.c) by writing
  arbitrary input to a temp file and calling rdbLoad(). RDB parsing is
  a critical attack surface for Redis replication and persistence.

Seed corpus: 13 valid RESP3 messages covering every reply type.
Dictionary: RESP3 type prefix tokens for guided mutation.
… parser

Vim is a ubiquitous text editor with a history of memory-safety CVEs
(heap overflows, use-after-free in regexp, eval, ex_cmds). It has no
existing OSS-Fuzz project.

Fuzz targets:
- fuzz_regexp: feeds arbitrary pattern/subject pairs to vim_regcomp()
  and vim_regexec(). Covers backtracking (regexp_bt.c), NFA engine
  (regexp_nfa.c), and all special regex syntax including backreferences,
  character classes, and look-around assertions.
- fuzz_vimscript: feeds arbitrary input to eval0() to exercise the
  Vimscript expression evaluator. Covers variable access, function calls,
  operators, and string/list/dict constructors.

Seed corpus: valid regex pattern/subject pairs for guided mutation.
Historical CVEs in scope: CVE-2022-0359, CVE-2022-0368, CVE-2022-0443,
CVE-2023-48231 (and many more in the regexp/eval paths).
@google-cla

google-cla Bot commented May 31, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@github-actions

Copy link
Copy Markdown

XananasX7 is integrating a new project, but the main_repo is missing. The criticality score cannot be computed.
XananasX7 is integrating a new project, but the main_repo is missing. The criticality score cannot be computed.

@XananasX7

Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

Signed-off-by: XananasX7 mehdiananas007@gmail.com

@XananasX7

Copy link
Copy Markdown
Author

The missing main_repo warning is because I didn't include it in project.yaml. I'll add main_repo: https://github.com/vim/vim to fix the criticality score check. Pushing an update now.

@DavidKorczynski DavidKorczynski left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@XananasX7

Copy link
Copy Markdown
Author

Added missing main_repo: "https://github.com/vim/vim" to project.yaml in the latest commit. CLA is signed via the Google CLA portal — the bot check should update shortly.

@XananasX7

Copy link
Copy Markdown
Author

Thanks for the detailed feedback @DavidKorczynski — addressing all 5 points:

  1. License headers — added Apache 2.0 license headers to all Dockerfiles that were missing them. This is now fixed across all open PRs.

  2. Maintainer communication — acknowledged. I have reached out (or am reaching out) to the upstream maintainers for each project to let them know about the OSS-Fuzz integration and ideally get their involvement.

  3. CLA — signed via the Google CLA portal. The bot check should reflect this.

  4. Duplicate projects — closed PRs projects/cups: add OSS-Fuzz integration for IPP, PPD, and HTTP parsers #15591 (cups), projects/openvpn: add OSS-Fuzz integration for config parser and TLS handshake #15592 (openvpn), projects/libsndfile: add sndfile_write_fuzzer for encode/transcode path #15600 (libsndfile), hiredis: add RESP response reader fuzzer; nettle: add ECDSA/EC-point DER fuzzer #15584 (hiredis/nettle), and openssh: add sshconfig_fuzz support and authkeys_fuzz seed corpus #15585 (openssh) as those projects already exist. Apologies for the duplicates.

  5. Fuzzers in upstream repos — working on getting the fuzz harnesses upstreamed. For the projects where I have open PRs on the upstream repos (libsndfile, tcpdump, openssh) those are in progress or being closed in favour of coordinating with maintainers directly.

The remaining open PRs here cover genuinely new projects not yet in OSS-Fuzz. Happy to address any other issues on those.

@XananasX7

Copy link
Copy Markdown
Author

Reauthored all commits with the correct email (mehdiananas007@gmail.com) matching the signed Google Individual CLA. The CLA bot should now verify successfully.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants