Skip to content
This repository has been archived by the owner on Jan 10, 2025. It is now read-only.

Commit

Permalink
Zero out RBP in order not to compromise the environment encryption.
Browse files Browse the repository at this point in the history
  • Loading branch information
Lichtso committed Sep 30, 2024
1 parent d3bdc1d commit 07fbe15
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/jit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ impl JitProgram {
"push rbp",
"mov [{host_stack_pointer}], rsp",
"add QWORD PTR [{host_stack_pointer}], -8",
// RBP is zeroed out in order not to compromise the runtime environment (RDI) encryption.
"xor rbp, rbp",
"mov [rsp-8], rax",
"mov rax, [r11 + 0x00]",
"mov rsi, [r11 + 0x08]",
Expand Down

0 comments on commit 07fbe15

Please sign in to comment.