Skip to content

R4-a: gpu-kernels hands every thread a &mut over the whole buffer (aliasing UB) #49

Description

@dendisuhubdy

circuits gpu-kernels: all() and dif_tiles give each GPU thread a &mut [u64] over the whole buffer. Writes are disjoint (no data race), but two live &mut to the same memory is undefined behaviour in Rust. Behind the non-default CUDA feature; no node path. Fix: per-element DisjointSlice access, or kernels over raw pointers. Recorded in circuits 27732e9's SAFETY comments.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:zkvmzkVM prover/verifierbugSomething isn't workingsecuritySecurity findingsev:lowSeverity low

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions