Summary
构造合约方法传递vector<Object<MockObject>>
会绕过object的owner检测
Details
合约方法vector<Object<MockObject>>
传入一个不存在的object或者其他用户的object可以绕过检测
PoC
`
struct MockObject has key, store{
}
public entry fun createMock(){
transfer(object::new(MockObject{}),@user_a)
}
public entry fun attack(objs: vector<Object>){
//TODO
}
`
创建userB 调用createMock方法创建 Object 并发送给userA, userB可以调用attack方法使用userA的object
Impact
用户资产会受影响
Summary
构造合约方法传递
vector<Object<MockObject>>
会绕过object的owner检测Details
合约方法
vector<Object<MockObject>>
传入一个不存在的object或者其他用户的object可以绕过检测PoC
`
struct MockObject has key, store{
}
public entry fun createMock(){
transfer(object::new(MockObject{}),@user_a)
}
public entry fun attack(objs: vector<Object>){
//TODO
}
`
创建userB 调用createMock方法创建 Object 并发送给userA, userB可以调用attack方法使用userA的object
Impact
用户资产会受影响