Skip to content

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

Merged
igorvytyaz merged 3 commits into
google:mainfrom
ztzat089-ctrl:fix/gltf-heap-overflow
Sep 23, 2026
Merged

igorvytyaz merged 3 commits into
google:mainfrom
ztzat089-ctrl:fix/gltf-heap-overflow

Conversation

@ztzat089-ctrl

Copy link
Copy Markdown
Contributor

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
Contributor Author

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

@ztzat089-ctrl ztzat089-ctrl left a comment

Copy link
Copy Markdown
Contributor 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.

@igorvytyaz
igorvytyaz merged commit 241ac66 into google:main Sep 23, 2026
37 checks passed
@igorvytyaz

Copy link
Copy Markdown
Collaborator

Thank you for making this contribution to Draco, @ztzat089-ctrl!

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.

2 participants