A memory overwrite bug was reported by a security researcher in the ConvertToSinglePlane method via the texconv command-line tool when given an invalid height for planar video textures such as NV12. This can be a potential security bug for any clients of the library who follow the same pattern.
This issue does not impact use of the DDS texture loader itself, only when combined with ConvertToSinglePlane
for converting multi-planar video formats. All other functions in the library fail immediately if given images in planar formats.
The fix to the specific area as well as general hardening can be found in this PR and will be included in the This bug has been fixed in the January 31, 2023 or later release of DirectXTex.
If your code makes use of ConvertToSinglePlane, you can validate that the width & height alignment requirements are met for the input image before calling the function.
{ "nvd_published_at": null, "cwe_ids": [], "severity": "MODERATE", "github_reviewed": true, "github_reviewed_at": "2023-01-26T19:52:50Z" }