Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix insert bytecode #271

Closed
wants to merge 2 commits into from
Closed

fix insert bytecode #271

wants to merge 2 commits into from

Conversation

publicqi
Copy link
Contributor

@publicqi publicqi commented Oct 24, 2023

This PR fixes two problems:

1. In src/evm/host.rs, clear_codedata should be put after $invoke.

  1. In src/evm/middlewares/coverage.rs, due to the previous problem, it's possible that both host.code and host.setcode_data do not have the bytecode for an address. To solve this, since we now have a parameter bytecode, we use this paramter.

Update:
It seems the order only matters for external use of setcode_data. Inside invoke_middlewares, we should clear before invoke. So I reverted the change to invoke_middlewares.

@fuzzland-bot
Copy link

Found: 6

Project Name Vulnerability Found Time Taken Log
DYNA_exp.txt -1 Log File
SEAMAN_exp.txt -1 Log File
BIGFI_exp.txt -1 Log File
BEGO_exp.txt ✅ Fund Loss 0h-0m-7s Log File
Yyds_exp.txt -1 Log File
AUR_exp.txt -1 Log File
Annex_exp.txt -1 Log File
PLTD_exp.txt -1 Log File
ApeDAO_exp.txt ✅ Price Manipulation 0h-0m-2s Log File
Axioma_exp.txt ‼️ Crashed -1 Log File
SELLC03_exp.txt -1 Log File
Novo_exp.txt ‼️ Crashed -1 Log File
VerilogCTF.txt ‼️ Crashed -1 Log File
THB_exp.txt -1 Log File
CS_exp.txt -1 Log File
EAC_exp.txt -1 Log File
GSS_exp.txt -1 Log File
SellToken_exp.txt -1 Log File
cftoken_exp.txt -1 Log File
GPT_exp.txt -1 Log File
OLIFE_exp.txt -1 Log File
MintoFinance_exp.txt ✅ Arbitrary Call 0h-0m-2s Log File
MBC_ZZSH_exp.txt -1 Log File
ROI_exp.txt ✅ Fund Loss 0h-0m-5s Log File
HEALTH_exp.txt ✅ Price Manipulation 0h-0m-1s Log File
Shadowfi_exp.txt -1 Log File
Carrot_exp.txt ✅ Arbitrary Call 0h-0m-0s Log File
RFB_exp.txt ‼️ Crashed -1 Log File

@publicqi publicqi marked this pull request as draft October 24, 2023 03:10
@fuzzland-bot
Copy link

Found: 19

Project Name Vulnerability Found Time Taken Log
DYNA_exp.txt -1 Log File
SEAMAN_exp.txt ✅ Fund Loss 0h-0m-15s Log File
BIGFI_exp.txt ✅ Price Manipulation 0h-0m-13s Log File
BEGO_exp.txt ✅ Fund Loss 0h-3m-29s Log File
Yyds_exp.txt ✅ Fund Loss 0h-2m-33s Log File
AUR_exp.txt -1 Log File
Annex_exp.txt -1 Log File
PLTD_exp.txt ✅ Price Manipulation 0h-2m-1s Log File
ApeDAO_exp.txt ✅ Price Manipulation 0h-0m-4s Log File
Axioma_exp.txt ✅ Fund Loss 0h-0m-4s Log File
SELLC03_exp.txt -1 Log File
Novo_exp.txt ✅ Price Manipulation 0h-0m-10s Log File
VerilogCTF.txt ‼️ Crashed 0h-0m-13s Log File
THB_exp.txt ✅ Fund Loss 0h-0m-43s Log File
CS_exp.txt ✅ Price Manipulation 0h-0m-4s Log File
EAC_exp.txt -1 Log File
GSS_exp.txt ✅ Price Manipulation 0h-2m-14s Log File
SellToken_exp.txt -1 Log File
cftoken_exp.txt ✅ Price Manipulation 0h-0m-5s Log File
GPT_exp.txt -1 Log File
OLIFE_exp.txt -1 Log File
MintoFinance_exp.txt ✅ Arbitrary Call 0h-0m-1s Log File
MBC_ZZSH_exp.txt ✅ Fund Loss 0h-1m-25s Log File
ROI_exp.txt ✅ Fund Loss 0h-0m-3s Log File
HEALTH_exp.txt ✅ Price Manipulation 0h-0m-1s Log File
Shadowfi_exp.txt ✅ Price Manipulation 0h-0m-4s Log File
Carrot_exp.txt ✅ Arbitrary Call 0h-0m-1s Log File
RFB_exp.txt ✅ Fund Loss 0h-0m-37s Log File

@publicqi publicqi closed this Oct 26, 2023
@publicqi publicqi deleted the fix_bytecode_insertion branch October 26, 2023 06:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants