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

H1 - GasReceipt injection using transferData #24

Open
PhABC opened this issue Jan 6, 2020 · 2 comments
Open

H1 - GasReceipt injection using transferData #24

PhABC opened this issue Jan 6, 2020 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@PhABC
Copy link
Contributor

PhABC commented Jan 6, 2020

image

by @Agusx1211

@PhABC PhABC added the bug Something isn't working label Jan 6, 2020
@PhABC PhABC self-assigned this Jan 6, 2020
@PhABC
Copy link
Contributor Author

PhABC commented Jan 6, 2020

I'm hesitant with this suggested fix, because when one assumes that a malicious dapp can make sign arbitrary transfer data, then the amount of harm they can do goes beyond gas fee reimbursement. For instance, a dapp could make you sell X for tokens Y on Niftyswap and transfer to themselves tokens Y instead of you receiving them.

Imo it should be the users and wallets responsibility to make sure that a user is aware of all the data that is signed such that nothing unintentional is included, where gasReceipt is just one example of things that the users need to verify.

@Agusx1211
Copy link
Member

The way I see it, transferData is not expected to be able to manipulate the funds of the users, so any security mechanism designed to protect the user from a malicious dApp (UI, Audit, etc.) may oversee the possibility of some party injecting transferData.

It also should be considered that this injection can also be performed in reverse, meaning that a relayer could pass the gasReceipt as additional transferData, this could have unforeseen consequences that are hard to predict, and it would depend on the receiving contract. Still, it could open the door to attacks in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants