arXiv:2611.06036cs.CRNov 2026

Manuscript Offprint

arXiv:2611.06036

PIMROP: A Feasibility Study of Return-Oriented Programming on Commercial Processing-in-Memory Architectures

William C. Tegge, Shouzhi Fang, Alex K. Jones

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

William C. Tegge

Syracuse University

wtegge@syr.edu

Shouzhi Fang

Syracuse University

sfang18@syr.edu

Alex K. Jones

Syracuse University

akj@syr.edu

Abstract—Processing-in-Memory places small programmable cores on the memory device, where they execute beside the DRAM banks and beyond the control-flow defenses that protect host programs. The security of this in-memory code is an attack surface that remains largely unstudied. We present PIMROP, to our knowledge the first demonstrated code-reuse attack on a commercial Processing-in-Memory ISA. We show that return-oriented programming is feasible on a real, commercially shipped PIM instruction set, the UPMEM DPU, whose DRAM Processing Units run C compiled by a dedicated LLVM toolchain. We build Galileo-for-DPU, a gadget scanner adapted to the DPU's fixed-width, 8-byte-aligned RISC encoding, and run it entirely on the UPMEM functional simulator in a reproducible Docker and VM environment. We find the runtime library that every kernel links already yields 517 non-trivial gadgets covering all five canonical ROP primitive classes, and all 13 PrIM benchmarks we scanned carry gadgets as well. We then demonstrate two verified end-to-end attacks, each reproducible on 10 of 10 runs. In the first, a stack buffer overflow in a DPU kernel overwrites the saved return address and diverts control into a routine that copies a secret into host-readable memory. In the second, we leak the same secret using a chain of reused gadgets alone, without diverting control into any such routine. We further show that two standard defenses—stack canaries and _FORTIFY_SOURCE-style bounds-check fortification—fail on the DPU in ways specific to the platform (misplaced canary, silently inactive wrapper), and we verify a bounds-checked DMA that stops the attack on 10 of 10 runs with no effect on benign requests. To enable further research on PIM security, we open-source Galileo-for-DPU and our testing harness at https://github.com/wtegge2/ROP-in-PIM.

Index Terms—processing-in-memory, UPMEM DPU, return-oriented programming, code-reuse attacks, control-flow hijacking, hardware security

I. INTRODUCTION

For decades the cost of moving data between memory and the processor has grown faster than the cost of computing on it. For today's memory-bound workloads, data movement dominates both time and energy [1]. Processing-in-Memory (PIM) attacks this problem directly by placing computation in or near the memory devices [1], [2], [3], [4]. The UPMEM DPU is the first commercially available, general-purpose PIM product [5], pairing each DRAM chip with programmable in-order cores (DRAM Processing Units) that run ordinary C compiled by a dedicated LLVM toolchain. A programmable processor now lives inside the memory module and with it, a new and largely unexamined attack surface.

Proposed control-flow defenses such as W⊕X/DEPW \oplus X/DEP, address-space layout randomization (ASLR), stack canaries, Intel CET, and ARM pointer authentication harden code running on the host CPU. None of them says anything about code executing on the DPU which runs on a different processor, with a different ISA, on the far side of the memory bus. PIM-security research so far has examined side and covert channels [6], RowHammer-style bit flips [7], and confidentiality of data offloaded to untrusted memory [8], and a recent threat-landscape survey [9] explicitly identifies code-reuse against programmable NDP cores as an open concern, but the integrity of control flow on the in-memory processor itself remains undemonstrated.

We ask the question Shacham [10] first posed for the x86 and Buchanan et al. [11] extended to RISC, now for a real PIM ISA: does a commercially deployed Processing-in-Memory processor contain enough reusable instruction fragments to mount return-oriented programming (ROP) attacks, on a target where none of the host's control-flow defenses apply? We focus on ROP because it is what we demonstrate end-to-end; its stackless cousin, jump-oriented programming (JOP) [12], appears here only as the indirect-jump terminators our scanner catalogs and a dispatcher we leave to future work. Because the DPU ISA is fixed-width and 8-byte aligned, we use the Buchanan RISC setting, in which gadgets are intended instruction suffixes of real functions. This method leaves out the extra "hidden" gadgets Shacham obtains on the x86 by decoding the same bytes at misaligned offsets, which the DPU's alignment rules out. We develop this distinction further in Section II-D. We also make two exploitation observations specific to the DPU 1) the saved return is stored as an instruction index rather than a byte address, and 2) standard stack canaries are bypassed in two independent ways on the DPU: misplaced by the toolchain, and replayable by the attacker even when correctly placed. We show that a bounds-checked DMA helps mitigate our attack.

We present PIMROP, to our knowledge the first demonstrated code-reuse (ROP) attack on a commercial Processing-in-Memory ISA. Our contributions are as follows:

  1. We build Galileo-for-DPU, a gadget scanner for the UPMEM DPU that recovers the calling convention and indirect-branch terminators from real llvm-objdump disassembly and enumerates gadgets under the DPU's fixed-width, 8-byte-aligned RISC encoding which is the Buchanan

RISC setting of intended instruction suffixes, not Shacham's x86 misaligned-decoding trick.

  1. We show that Shacham's feasibility thesis [10] holds on real DPU code. In the runtime library alone we discover 317 indirect-branch terminators and 517 non-trivial gadgets covering all five canonical ROP primitive classes, and we find gadgets in every one of 13 PrIM benchmarks [5].

  2. We demonstrate two verified end-to-end attacks on the functional simulator against an intentionally vulnerable DPU kernel. The first hijacks the saved return and diverts control into a routine that copies a secret into host-readable memory. The second leaks the same secret using a chain of reused library gadgets alone, without diverting control into any such routine.

  3. We demonstrate the two reused control-flow primitives required for Turing-complete computation from a code-reuse chain on the DPU: a conditional branch with a runtime-chosen target and a loop with a runtime-chosen iteration count, each measured as deterministic across input variations and built from the already-linked runtime library alone.

  4. We present a defense-gap analysis with a measured mitigation study. The DPU side has no ASLR and no CFI or pointer authentication, and stack canaries are ineffective in two independent ways: the toolchain places the slot on the wrong side of the frame on this upward-growing stack, and even a correctly-placed canary is bypassed 10 of 10 by a sink-free chain that preserves the DPU's fixed, host-unseeded guard value. We then verify a bounds-checked DMA that does stop the attack and identify the code change needed to make canaries effective.

References (30)