neoneo-go/pkg
Anna Shaleva 3be37e8c5b vm: check instruction offset is valid before subsequent IP move
Reference implementation:
e167f03e25/src/neo-vm/ExecutionContext.cs (L77).

Turns out that exception-related code (try\finally handling) is the only
place where next instruction pointer bounds are not pre-checked before
assignment. This statement is true for both go and C# implementations.
However, C# code has duplicate check located inside the
InstructionPointer setter for all instructions except the
exception-related ones. Neo-go code doesn't perform this duplicate check.
Thus, C# VM FAULTs execution in case of invalid TRY/FINALLY offsets, and
neo-go VM does not.

This commit reverts a part of
https://github.com/nspcc-dev/neo-go/pull/2396. This bug is discovered
thanks to test added in https://github.com/neo-project/neo-vm/pull/453.
2022-05-11 14:04:02 +03:00
..
compiler core: extend native Neo interop API 2022-05-06 13:43:12 +03:00
config [#2442] English Check 2022-05-04 19:48:27 +03:00
consensus [#2442] English Check 2022-05-04 19:48:27 +03:00
core core: fix race during native cache persist 2022-05-06 13:46:17 +03:00
crypto [#2442] English Check 2022-05-04 19:48:27 +03:00
encoding [#2442] English Check 2022-05-04 19:48:27 +03:00
interop core: extend native Neo interop API 2022-05-06 13:43:12 +03:00
io [#2442] English Check 2022-05-04 19:48:27 +03:00
neotest [#2442] English Check 2022-05-04 19:48:27 +03:00
network Merge pull request #2466 from nspcc-dev/rules-fixes 2022-05-06 11:09:39 +03:00
rpc rpc: move latest getversion compat to 0.98.3 2022-05-07 22:34:40 +03:00
services services: fix gosimple warning 2022-05-11 07:39:27 +03:00
smartcontract [#2442] English Check 2022-05-04 19:48:27 +03:00
util [#2442] English Check 2022-05-04 19:48:27 +03:00
vm vm: check instruction offset is valid before subsequent IP move 2022-05-11 14:04:02 +03:00
wallet [#2442] English Check 2022-05-04 19:48:27 +03:00