]> git.ipfire.org Git - thirdparty/vim.git/commit
patch 9.0.2106: [security]: Use-after-free in win_close() v9.0.2106
authorChristian Brabandt <cb@256bit.org>
Tue, 14 Nov 2023 18:31:34 +0000 (19:31 +0100)
committerChristian Brabandt <cb@256bit.org>
Thu, 16 Nov 2023 21:04:00 +0000 (22:04 +0100)
commit25aabc2b8ee1e19ced6f4da9d866cf9378fc4c5a
tree9b56e90635d6bc6b124bda1d179348bcd6a2cf8d
parent67abf1592c83c910c7815478f67e0a8989d51417
patch 9.0.2106: [security]: Use-after-free in win_close()

Problem:  [security]: Use-after-free in win_close()
Solution: Check window is valid, before accessing it

If the current window structure is no longer valid (because a previous
autocommand has already freed this window), fail and return before
attempting to set win->w_closing variable.

Add a test to trigger ASAN in CI

Signed-off-by: Christian Brabandt <cb@256bit.org>
src/testdir/crash/poc1 [new file with mode: 0644]
src/testdir/test_crash.vim
src/version.c
src/window.c