cuda.core: document IPC buffer pickle trust boundary (Glasswing V13.1)#2225
Merged
Andy-Jost merged 3 commits intoJun 16, 2026
Merged
Conversation
Document the pickle-to-IPC-import trust boundary and emit a one-time UserWarning when unpickling a Buffer reconstructs via from_ipc_descriptor (Glasswing V13.1).
NVBUG V13.1 mitigation is documentation, not a per-unpickle warning. Legitimate multiprocessing IPC buffer sharing would spam UserWarning on every round-trip.
Drop CWE-502 label from inline comment; tracker vocabulary belongs in SECURITY.md and NVBUG disposition, not production code.
mdboom
approved these changes
Jun 15, 2026
This comment has been minimized.
This comment has been minimized.
|
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.
Summary
Addresses Glasswing finding V13.1 (NVBUG 6268891): unpickling a
Bufferfrom an IPC-enabled memory resource reconstructs the object by callingBuffer.from_ipc_descriptorwith the embeddedIPCBufferDescriptor, crossing a trust boundary when pickle data comes from an untrusted peer. Pickle support is intentional for same-host multiprocessing buffer sharing; the audit mitigation is documentation of the trust assumption, not a runtime warning on every legitimate unpickle. Hard descriptor validation is handled separately in V2.1/V2.2 (#2223, #2224).Changes
cuda_core/cuda/core/_memory/_buffer.pyx: document pickle/IPC trust boundary onBufferandfrom_ipc_descriptor; add CWE-502 security comment on__reduce__cuda_core/cuda/core/_memory/_ipc.pyx: document untrusted peer fields onIPCBufferDescriptorcuda_core/cuda/core/_memory/_device_memory_resource.pyx: extend IPC serialization docs with trust-boundary guidanceSECURITY.md: add CUDA IPC and Python serialization sectionTest Coverage
Doc-only change; no new tests. Existing IPC pickle round-trip tests in
tests/memory_ipc/andtests/test_object_protocols.pycontinue to cover the supported workflow without warnings.Related Work