VDB
Sign up
MEDIUM6.9

GHSA-4v7v-gqf9-ww2g

Vyper: Call stack corruption when passing complex type containing non-base type members as argument

Quick fix

GHSA-4v7v-gqf9-ww2g — vyper: upgrade to the fixed version with the command below.

pip install --upgrade 'vyper>=0.2.6'

Details

### Impact When we pass a multi-dimensional array (like `[[1, 2], [3, 4]]`) as an argument to internal/external functions we get incorrect output. This is due to a stack management issue, because it was assumed that the size of each subtype of an array/struct is 32, which is not always correct.

Example code: ```python @internal def test_input(arr: int128[2][1], i: int128) -> (int128[2][1], int128): return arr, i

@external def test_values(arr: int128[2][1], i: int128) -> (int128[2][1], int128): return self.test_input(arr, i) ```

Please see #2183 for further information

### Patches This problem was fixed in #2184, and released as a part of [`v0.2.6`](https://github.com/vyperlang/vyper/releases/tag/v0.2.6).

Are you affected?

Enter the version of the package you're using.

Affected packages

PyPI/vyper
Introduced in: 0Fixed in: 0.2.6
Fixpip install --upgrade 'vyper>=0.2.6'

References

Check it before you install it

One call answers whether to add this package: known advisories, CISA KEV, and whether the name is a hallucinated or freshly squatted one. No key needed to try it.

curl -s https://vdb.ai.kr/v1/ai/check-packages \
  -H 'Content-Type: application/json' \
  -d '{"packages":["pkg:pypi/vyper"]}'