Skip to content

vulkan: Treat zero-size buffer transfers as no-ops#163

Open
utzcoz wants to merge 1 commit into
google:mainfrom
utzcoz:fix-VUID-VkBufferCopy-size-01988
Open

vulkan: Treat zero-size buffer transfers as no-ops#163
utzcoz wants to merge 1 commit into
google:mainfrom
utzcoz:fix-VUID-VkBufferCopy-size-01988

Conversation

@utzcoz

@utzcoz utzcoz commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

A guest-controlled transfer with an in-range offset and size 0 passed the bounds check and recorded a VkBufferCopy with size 0, which the Vulkan spec forbids (VUID-VkBufferCopy-size-01988). Return success without touching the device instead, in both readBufferToBytes and updateBufferFromBytes. Zero-size transfers with an out-of-range offset are still rejected.

Test: bazel test //host/vulkan:vk_common_operations_tests
Change-Id: I641878b897b41c7476d14e66380bf86d6908e9f4

A guest-controlled transfer with an in-range offset and size 0 passed
the bounds check and recorded a VkBufferCopy with size 0, which the
Vulkan spec forbids (VUID-VkBufferCopy-size-01988). Return success
without touching the device instead, in both readBufferToBytes and
updateBufferFromBytes. Zero-size transfers with an out-of-range offset
are still rejected.

Test: bazel test //host/vulkan:vk_common_operations_tests
Change-Id: I641878b897b41c7476d14e66380bf86d6908e9f4
@utzcoz

utzcoz commented Jul 15, 2026

Copy link
Copy Markdown
Contributor Author

Hi @jmacnak , PTAL. Thanks.

@utzcoz

utzcoz commented Jul 16, 2026

Copy link
Copy Markdown
Contributor Author

I will take look at failed tasks. It's network issue. I think I need to investigate why my fork branch still run CI jobs.

@utzcoz

utzcoz commented Jul 18, 2026

Copy link
Copy Markdown
Contributor Author

Hi @jmacnak , could you help to review this PR? Thanks.

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