Repository navigation
check filters allocation in parse_id_filter_environment_var - #2083
Merged
Merged
Conversation
|
User aizu-m not on autobuild list. Waiting for curator authorization before starting CI build. |
1 similar comment
|
User aizu-m not on autobuild list. Waiting for curator authorization before starting CI build. |
charles-lunarg
approved these changes
Oct 24, 2026
charles-lunarg
left a comment
Collaborator
There was a problem hiding this comment.
Whoops! Thanks for the catch.
I figured thered be a slew of new issues after my big PR to remove alloca - I did get a decent review from claude (which found numerous mistakes) but more eyes is more better after all.
|
CI Vulkan-Loader build queued with queue ID 170421. |
|
CI Vulkan-Loader build # 3908 running. |
|
CI Vulkan-Loader build # 3908 passed. |
Contributor
Author
|
Thanks for merging. Easy one to miss next to the parsing_string check. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AddressSanitizer, new test
Allocation.EnumeratePhysicalDevicesWithIdFilterIntentionalAllocFailagainst the unpatched loader:Found while reading the OOM handling added in 9cb1f10.
parse_id_filter_environment_varnow returns a VkResult and checks theparsing_stringallocation. Thefiltersarray allocated two statements later is never checked. WithVK_LOADER_DEVICE_ID_FILTER,VK_LOADER_VENDOR_ID_FILTERorVK_LOADER_DRIVER_ID_FILTERset, a failed allocation from the instance allocator makes the strtok loop write each parsed begin/end pair to NULL + 8 * token index.check_id_matches_filter_environment_varthen reads through the same pointer.Steps:
loader/for a missing NULL check. This is the only one.VK_LOADER_DEVICE_ID_FILTERand sweeps the failing allocation index over vkCreateInstance, vkEnumeratePhysicalDevices and vkEnumeratePhysicalDeviceGroups. It aborts with the trace above.