Skip to content

[C++][Integration]Missing runtime validation in BinaryView JSON parsing #49759

@metsw24-max

Description

@metsw24-max

Describe the bug, including details regarding any error messages, version, and platform.

The BinaryView JSON parser relies on DCHECK-based validation for fields such as
SIZE, BUFFER_INDEX, OFFSET, and inline payload lengths.

Since DCHECKs are disabled in release builds, malformed JSON inputs can bypass
validation and propagate unsafe values into buffer operations.

This can lead to out-of-bounds access or incorrect memory usage when parsing
untrusted input.

This issue proposes adding strict runtime validation for:

  • SIZE bounds
  • Inline payload length consistency
  • BUFFER_INDEX and OFFSET validity
  • Buffer range checks

A corresponding patch with regression tests has been opened.

Component(s)

C++

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions