Skip to content

cuda.core: document IPC buffer pickle trust boundary (Glasswing V13.1)#2225

Merged
Andy-Jost merged 3 commits into
NVIDIA:mainfrom
Andy-Jost:ajost/glasswing-v13-1-buffer-pickle-ipc-warning
Jun 16, 2026
Merged

cuda.core: document IPC buffer pickle trust boundary (Glasswing V13.1)#2225
Andy-Jost merged 3 commits into
NVIDIA:mainfrom
Andy-Jost:ajost/glasswing-v13-1-buffer-pickle-ipc-warning

Conversation

@Andy-Jost

@Andy-Jost Andy-Jost commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Summary

Addresses Glasswing finding V13.1 (NVBUG 6268891): unpickling a Buffer from an IPC-enabled memory resource reconstructs the object by calling Buffer.from_ipc_descriptor with the embedded IPCBufferDescriptor, 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 on Buffer and from_ipc_descriptor; add CWE-502 security comment on __reduce__
  • cuda_core/cuda/core/_memory/_ipc.pyx: document untrusted peer fields on IPCBufferDescriptor
  • cuda_core/cuda/core/_memory/_device_memory_resource.pyx: extend IPC serialization docs with trust-boundary guidance
  • SECURITY.md: add CUDA IPC and Python serialization section

Test Coverage

Doc-only change; no new tests. Existing IPC pickle round-trip tests in tests/memory_ipc/ and tests/test_object_protocols.py continue to cover the supported workflow without warnings.

Related Work

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).
@Andy-Jost Andy-Jost added this to the cuda.core v1.1.0 milestone Jun 15, 2026
@Andy-Jost Andy-Jost added documentation Improvements or additions to documentation P1 Medium priority - Should do cuda.core Everything related to the cuda.core module labels Jun 15, 2026
@Andy-Jost Andy-Jost self-assigned this Jun 15, 2026
NVBUG V13.1 mitigation is documentation, not a per-unpickle warning.
Legitimate multiprocessing IPC buffer sharing would spam UserWarning on
every round-trip.
@Andy-Jost Andy-Jost changed the title cuda.core: document and warn on unpickling IPC buffers (Glasswing V13.1) cuda.core: document IPC buffer pickle trust boundary (Glasswing V13.1) Jun 15, 2026
Drop CWE-502 label from inline comment; tracker vocabulary belongs in
SECURITY.md and NVBUG disposition, not production code.
@Andy-Jost Andy-Jost requested a review from mdboom June 15, 2026 19:23
@github-actions

This comment has been minimized.

@Andy-Jost Andy-Jost merged commit 32da37d into NVIDIA:main Jun 16, 2026
236 of 256 checks passed
@Andy-Jost Andy-Jost deleted the ajost/glasswing-v13-1-buffer-pickle-ipc-warning branch June 16, 2026 02:49
@github-actions

Copy link
Copy Markdown
Doc Preview CI
Preview removed because the pull request was closed or merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cuda.core Everything related to the cuda.core module documentation Improvements or additions to documentation P1 Medium priority - Should do

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants