Skip to content

fix: in zstd_edist in zstd_edist.c#4644

Open
orbisai0security wants to merge 1 commit intofacebook:devfrom
orbisai0security:fix-fix-heap-buffer-overflow-zstd-edist-combine-matches
Open

fix: in zstd_edist in zstd_edist.c#4644
orbisai0security wants to merge 1 commit intofacebook:devfrom
orbisai0security:fix-fix-heap-buffer-overflow-zstd-edist-combine-matches

Conversation

@orbisai0security
Copy link
Copy Markdown

Summary

Fix critical severity security issue in contrib/match_finders/zstd_edist.c.

Vulnerability

Field Value
ID V-001
Severity CRITICAL
Scanner multi_agent_ai
Rule V-001
File contrib/match_finders/zstd_edist.c:416

Description: In zstd_edist.c, three memcpy operations at lines 416, 430, and 435 copy match data into and out of combinedMatches without validating that nbCombinedMatches * sizeof(ZSTD_eDist_match) fits within the allocated buffer. If nbCombinedMatches is derived from attacker-controlled compressed input and exceeds the allocated capacity, the memcpy at line 435 writes beyond the heap buffer boundary, corrupting adjacent heap memory.

Changes

  • contrib/match_finders/zstd_edist.c

Verification

  • Build passes
  • Scanner re-scan confirms fix
  • LLM code review passed

Automated security fix by OrbisAI Security

Automated security fix generated by Orbis Security AI
@meta-cla meta-cla Bot added the CLA Signed label Apr 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant