Skip to content

fix(yara): strip 3 more OSS-Fuzz corpus fixtures#17343

Open
PawelWMS wants to merge 1 commit into
4.0from
pawelwi/yara-strip-fuzz-corpus
Open

fix(yara): strip 3 more OSS-Fuzz corpus fixtures#17343
PawelWMS wants to merge 1 commit into
4.0from
pawelwi/yara-strip-fuzz-corpus

Conversation

@PawelWMS
Copy link
Copy Markdown
Contributor

@PawelWMS PawelWMS commented May 18, 2026

Summary

Follow-up to PR #17097: a fresh scan on yara-4.5.4-5.azl4.src.rpm flagged three additional benign oss-fuzz seed-corpus inputs that the original fix did not catch. This change appends them to STRIP_PATHS in base/comps/yara/modify_source.sh.

Newly stripped paths (all under tests/oss-fuzz/):

  • dex_fuzzer_corpus/27fb31059503773723597edb875c937af971a6c15f91aac8c03c1fbdfa9e918c
  • dex_fuzzer_corpus/b343d1058063e6e4b652ccf0589f93d0dbb6b092960e4aebc3c3c58894831359
  • dotnet_fuzzer_corpus/buggy_stream_names

Heuristics tripping on them: generic Android-packer detection on the DEX entries, and a high-entropy-entrypoint packer detection on the .NET entry.

Why no further Makefile.am edit

These three files live under tests/oss-fuzz/*_fuzzer_corpus/ directories. The merged PR #17097's modify_source.sh already documents that these directories are not referenced from upstream's Makefile.am — they are consumed only by libFuzzer harnesses, not by the autotools make check driver. So the existing Makefile.am edit that drops test-pe (which is for the tests/data/ PE fixtures) remains correct and complete; no companion edit is needed for the fuzzer-corpus additions.

Files

  • base/comps/yara/modify_source.sh — append three new entries to STRIP_PATHS (now sorted alphabetically); rewrite both comment blocks (the file-level Background header and the one above STRIP_PATHS) to reflect the full current strip scope: oss-fuzz seed corpora under tests/oss-fuzz/, plus four hash-named PE fixtures under tests/data/ (three SHA-256-named plus one .upx-suffixed sibling).
  • base/comps/yara/yara.comp.toml — refresh hash + origin.uri to new modified-tarball SHA-512 (94d4aab0…d7b646b); slim replace-reason to a short pointer (detailed list lives in modify_source.sh).
  • locks/yara.lock — refreshed input-fingerprint.
  • specs/y/yara/{yara.spec,sources} — re-rendered: release bumped to 6, sources SHA-512 swapped to the modified-tarball hash, new %changelog entry.

@PawelWMS PawelWMS force-pushed the pawelwi/yara-strip-fuzz-corpus branch from 93d6aee to d102de2 Compare May 18, 2026 23:38
@PawelWMS PawelWMS marked this pull request as ready for review May 19, 2026 06:06
Copilot AI review requested due to automatic review settings May 19, 2026 06:06
@PawelWMS PawelWMS requested a review from christopherco as a code owner May 19, 2026 06:06
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the yara component’s modified Source0 tarball to strip three additional OSS-Fuzz seed-corpus fixtures that are benign but trip malware-scanner heuristics, and refreshes the component metadata/locks/rendered specs accordingly.

Changes:

  • Extend base/comps/yara/modify_source.sh to remove three additional tests/oss-fuzz/*_fuzzer_corpus/* entries.
  • Update base/comps/yara/yara.comp.toml to point at the newly repacked tarball (new SHA512 + lookaside URI) and adjust replace-reason.
  • Refresh locks/yara.lock and re-render specs/y/yara/{sources,yara.spec} (release/changelog + sources checksum).

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
base/comps/yara/modify_source.sh Adds three new corpus paths to the deterministic strip/repack flow and updates in-script documentation near STRIP_PATHS.
base/comps/yara/yara.comp.toml Updates Source0 replacement SHA512 and blob URI to the newly repacked tarball; refines replace-reason.
locks/yara.lock Refreshes input-fingerprint for the updated component inputs.
specs/y/yara/sources Updates the recorded SHA512 for yara-4.5.4.tar.gz to the modified tarball hash.
specs/y/yara/yara.spec Re-rendered output: release bump and new rpmautospec changelog entry.

Comment thread base/comps/yara/modify_source.sh Outdated
Comment thread base/comps/yara/modify_source.sh
@PawelWMS PawelWMS force-pushed the pawelwi/yara-strip-fuzz-corpus branch 2 times, most recently from 3f55cf0 to a0297f2 Compare May 19, 2026 17:42
Copy link
Copy Markdown
Member

@reubeno reubeno left a comment

Choose a reason for hiding this comment

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

Change looks fine; could you update to use conventional commits in the commit and PR, please?

@PawelWMS PawelWMS changed the title yara: strip 3 more oss-fuzz corpus fixtures flagged by fresh scan fix(yara): strip 3 more OSS-Fuzz corpus fixtures May 20, 2026
A subsequent scan pass on `yara-4.5.4-5.azl4.src.rpm` flagged three
additional benign oss-fuzz seed-corpus inputs that the original fix
(PR #17097) did not catch:

  - `tests/oss-fuzz/dex_fuzzer_corpus/27fb31059503773723597edb875c937af971a6c15f91aac8c03c1fbdfa9e918c`
  - `tests/oss-fuzz/dex_fuzzer_corpus/b343d1058063e6e4b652ccf0589f93d0dbb6b092960e4aebc3c3c58894831359`
  - `tests/oss-fuzz/dotnet_fuzzer_corpus/buggy_stream_names`

The DEX corpora trip generic Android-packer heuristics; the .NET
entry trips a high-entropy-entrypoint packer heuristic. All three
are deliberately-pathological fuzzer-corpus inputs that exercise
YARA's DEX and .NET parsers via libFuzzer harnesses. They are NOT
referenced from `Makefile.am`, so the autotools `make check`
driver does not consume them and no companion `Makefile.am` edit
is needed -- the existing `test-pe` removal from PR #17097 is
orthogonal (it targets `tests/data/` PE fixtures, not the
`tests/oss-fuzz/*_fuzzer_corpus/` directories).

Files:

- `base/comps/yara/modify_source.sh`: append the three new paths
  to `STRIP_PATHS` (now sorted alphabetically). Rewrite both
  comment blocks (the file-level `Background` header and the
  one above `STRIP_PATHS`) to reflect the full current strip
  scope: oss-fuzz seed corpora under `tests/oss-fuzz/`, plus
  four hash-named PE fixtures under `tests/data/` (three
  SHA-256-named plus one `.upx`-suffixed sibling).
- `base/comps/yara/yara.comp.toml`: refresh `hash` and
  `origin.uri` to point at the new modified-tarball SHA-512
  (`94d4aab0...d7b646b`). Slim down `replace-reason` to a short
  pointer; the detailed list lives in `modify_source.sh`.
- `locks/yara.lock`: refreshed `input-fingerprint`.
- `specs/y/yara/{yara.spec,sources}`: re-rendered (release bump
  to 6, updated source SHA-512, new `%changelog` entry).
@PawelWMS PawelWMS force-pushed the pawelwi/yara-strip-fuzz-corpus branch from a0297f2 to e277263 Compare May 20, 2026 17:34
@github-actions
Copy link
Copy Markdown

📄❌ Rendered specs are out of date

FIX: — run this and commit the result:

azldev component render yara

Or download the fix patch and apply it:

gh run download 26179217382 -R microsoft/azurelinux -n rendered-specs-patch
git apply rendered-specs.patch
Category Count
Content diffs 1
Extra files (untracked) 0
Missing files (deleted) 0

Content diffs

`specs/y/yara/yara.spec`
--- committed/specs/y/yara/yara.spec
+++ rendered/specs/y/yara/yara.spec
@@ -202,7 +202,7 @@
 %changelog
 ## START: Generated by rpmautospec
 * Mon May 18 2026 Pawel Winogrodzki <pawelwi@microsoft.com> - 4.5.4-6
-- yara: strip 3 more oss-fuzz corpus fixtures flagged by fresh scan
+- fix(yara): strip 3 more oss-fuzz corpus fixtures flagged by fresh scan
 
 * Thu May 14 2026 Pawel Winogrodzki <pawelwi@microsoft.com> - 4.5.4-5
 - yara: serve modified Source0 with malware-flagged test fixtures stripped

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.

3 participants