Skip to content

Fix heap overflow in CopyDataAsFloatImpl by validating accessor bounds - #1214

Open
ztzat089-ctrl wants to merge 1 commit into
google:mainfrom
ztzat089-ctrl:fix/gltf-heap-overflow
Open

Fix heap overflow in CopyDataAsFloatImpl by validating accessor bounds#1214
ztzat089-ctrl wants to merge 1 commit into
google:mainfrom
ztzat089-ctrl:fix/gltf-heap-overflow

Conversation

@ztzat089-ctrl

Copy link
Copy Markdown

This PR fixes a heap buffer overflow (out-of-bounds read) in
CopyDataAsFloatImpl() in tiny_gltf_utils.h. The function did not
validate accessor.count, byte_stride, or buffer offsets before
reading data, which could allow reading beyond the allocated buffer
when processing a maliciously crafted glTF file.

This issue was reported to Google via the OSS VRP program
(Issue Tracker #543813782), and Google confirmed the vulnerability.
The fix adds bounds validation before the read.

Full test suite passes (425/425 tests).

@google-cla

google-cla Bot commented Aug 7, 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.

@ztzat089-ctrl

Copy link
Copy Markdown
Author

Hello Google, please investigate and verify this vulnerability. Thank you very much.

@ztzat089-ctrl ztzat089-ctrl left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Hello Google, please investigate and verify this vulnerability. Thank you very much.

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