8000 Missing boundary check for load/store in JIT compiler · Issue #435 · iovisor/ubpf · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Missing boundary check for load/store in JIT compiler #435
Open
@pcy190

Description

@pcy190

The current JIT compiler does not emit boundary checks for the load/store memory opcode. Hence, any program can perform an invalid memory operation.

e.g., the following PoC program can trigger invalid memory write:

mov %r0, 0
stxdw [%r0+96], %r0

Running it under JIT mode, we can get:

==173819==ERROR: UndefinedBehaviorSanitizer: SEGV on unknown address 0x0000000000f8 (pc 0x7fd973a5e023 bp 0x7ffd906bec70 sp 0x7ffd906bea60 T173819)
==173819==The signal is caused by a WRITE memory access.

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

      0