Closed code423n4 closed 1 year ago
minhquanym marked the issue as primary issue
CJ42 requested judge review
CJ42 marked the issue as sponsor disputed
No impact stated, this is QA recommendation at best.
trust1995 marked the issue as unsatisfactory: Invalid
Lines of code
https://github.com/code-423n4/2023-06-lukso/blob/main/contracts/LSP6KeyManager/LSP6Modules/LSP6SetDataModule.sol#L222
Vulnerability details
Impact
The below situations do not have checks on their inputs:
When
bytes12(inputDataKey) == _LSP6KEY_ADDRESSPERMISSIONS_PERMISSIONS_PREFIX
:According to LSP6,
inputDataValue
is expected to be exactly 32 bytes.When
inputDataKey == _LSP1_UNIVERSAL_RECEIVER_DELEGATE_KEY || bytes12(inputDataKey) == _LSP1_UNIVERSAL_RECEIVER_DELEGATE_PREFIX
:According to LSP1,
inputDataValue
is expected to be exactly 20 bytes (an address).When
bytes12(inputDataKey) == _LSP17_EXTENSION_PREFIX
:According to LSP17,
inputDataValue
is expected to be exactly 20 bytes (an address).When
inputDataKey == _LSP6KEY_ADDRESSPERMISSIONS_ARRAY
:According to LSP2,
inputDataValue
is expected to be exactly 16 bytes (the array length).Recommended Mitigation Steps
Add validation checks on input data.
Assessed type
Invalid Validation