Skip to content

Fix out-of-bounds memory access with DFD MODEL#27

Merged
MarkCallow merged 1 commit into
KhronosGroup:mainfrom
walcht:fix_out_of_bounds_issue
Jul 8, 2026
Merged

Fix out-of-bounds memory access with DFD MODEL#27
MarkCallow merged 1 commit into
KhronosGroup:mainfrom
walcht:fix_out_of_bounds_issue

Conversation

@walcht

@walcht walcht commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

See commit message for details.

The issue can be reproduced when running KTX-Sofware with ASan (AddressSanitizer) in Debug mode.
See also KhronosGroup/KTX-Software#1205.

Fix out-of-bounds memory access issue with erroneous inputs with very small
DFD where KHR_DFDVAL(block, MODEL) is used to perform array access (i.e.,
block[KHR_DF_WORD_MODEL]) BEFORE checking the actual size of the
allocated block. This is fixed by moving DFD MODEL access after
sizeof_BDFD check.

Signed-off-by: Walid Chtioui <walid.chtioui.main@gmail.com>
@CLAassistant

CLAassistant commented Jul 8, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@MarkCallow MarkCallow merged commit fd3349c into KhronosGroup:main Jul 8, 2026
9 checks passed
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.

3 participants