Skip to content

Invalid capability returned by CCopyType #284

@Andreas-Bur

Description

@Andreas-Bur

There seems to be an issue where the CCopyType instruction mistakenly clears the tag of the result if the capability's bounds are set to zero.
This was tested on 64bit RISCV.

PoC:

  cseal c1,cnull,cnull
  cspecialrw c2,31,cnull
  csetboundsexact c2,c2,zero
  ccopytype c3,c2,c1
  cgettag x4,c3

Expected value: x4=1
Actual value: x4=0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions