Skip to content

fix: add bounds check before memcpy in decoder.cpp#449

Open
orbisai0security wants to merge 1 commit into
langhuihui:v3from
orbisai0security:fix-heap-buffer-overflow-frame-dimensions
Open

fix: add bounds check before memcpy in decoder.cpp#449
orbisai0security wants to merge 1 commit into
langhuihui:v3from
orbisai0security:fix-heap-buffer-overflow-frame-dimensions

Conversation

@orbisai0security

Copy link
Copy Markdown

Summary

Fix critical severity security issue in wasm/decoder.cpp.

Vulnerability

Field Value
ID V-001
Severity CRITICAL
Scanner multi_agent_ai
Rule V-001
File wasm/decoder.cpp:267
Assessment Confirmed exploitable

Description: The decoder performs three memcpy operations copying Y, U, and V plane data from decoded video frames into a destination buffer without validating that the copy sizes (videoWidth, halfw) fit within the allocated destination buffer. A malicious video stream with manipulated frame dimensions can cause writes beyond the allocated heap buffer in WebAssembly linear memory.

Evidence

Exploitation scenario: Attacker crafts a malicious H.

Scanner confirmation: multi_agent_ai rule V-001 flagged this pattern.

Production code: This file is in the production codebase, not test-only code.

Threat Model Context

This is a Node.js library - vulnerabilities affect downstream consumers who use this package.

Changes

  • wasm/decoder.cpp

Verification

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

Automated security fix by OrbisAI Security

Automated security fix generated by OrbisAI Security
@vercel

vercel Bot commented May 29, 2026

Copy link
Copy Markdown

@orbisai0security is attempting to deploy a commit to the langhuihui's projects Team on Vercel.

A member of the Team first needs to authorize it.

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.

1 participant