aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/async/_queue.lua
diff options
context:
space:
mode:
authorVolodymyr Chernetskyi <volodymyr_chernetskyi@goodyear.com>2026-09-04 18:48:55 +0200
committerGitHub <noreply@github.com>2026-09-04 12:48:55 -0400
commitf1833490a046611c90d8be31cab2ef9d5d055056 (patch)
tree3fe3d76e528a6897c41892b545079dc045f40004 /runtime/lua/vim/async/_queue.lua
parent0a173b09f4fc3b13833128c8fb16708af2b93795 (diff)
downloadrneovim-f1833490a046611c90d8be31cab2ef9d5d055056.tar.gz
rneovim-f1833490a046611c90d8be31cab2ef9d5d055056.tar.bz2
rneovim-f1833490a046611c90d8be31cab2ef9d5d055056.zip
fix(msgpack): out-of-bounds read on a truncated string #41683
Problem: `unpack_string()` validates the declared length against `*size`, the size *before* `mpack_rtoken()` consumed the token header, rather than `size2`, the remainder after it. The header is one to five bytes, so any declared length in the window `(size2, *size]` slips through. The returned `String` then covers up to five bytes past the end of the buffer, and `size2 - tok.length` underflows, leaving `*size` near `SIZE_MAX` so every later unpack call on that entry believes it has an unbounded buffer. Reachable from ShaDa, where a history entry ending in a five-byte string header followed by four bytes is enough, so a corrupted or hostile `main.shada` triggers it at startup. Solution: Check the remainder left after the header. AI-assisted
Diffstat (limited to 'runtime/lua/vim/async/_queue.lua')
0 files changed, 0 insertions, 0 deletions