Search Apps Documentation Source Content File Folder Download Copy Actions Download State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

laundervictim package

Overview

Package laundervictim is the "victim" realm in the launder-game tests. It exposes a package-level g that an attacker tries to mutate by various means. Two shapes are exposed:

  • gVal is `launderpkg.Object` (value type).
  • gPtr is `*launderpkg.Object` (pointer to a fresh Object).

Both are allocated at init under this realm's context, so their PkgID stamp is /r/.../laundervictim. The attacker's job is to make the stamp not match m.Realm at the write site — by laundering the stamp, capturing the value, or exploiting a borrow-rule shift.

Function

GetBuf

func GetBuf() []byte

GetBuf returns the victim's own byte buffer. The returned slice aliases the victim's persisted backing array (/r/laundervictim-stamped).

Command

gnokey query vm/qeval -remote "https://api.gno.berty.io:443" -data "gno.land/r/tests/vm/laundervictim.GetBuf()"

Result