diff options
| author | Sean Dewar <6256228+seandewar@users.noreply.github.com> | 2026-02-06 23:13:04 +0000 |
|---|---|---|
| committer | Sean Dewar <6256228+seandewar@users.noreply.github.com> | 2026-02-08 16:12:00 +0000 |
| commit | d945a93d69c994dd7a88629ac3a59034f1184631 (patch) | |
| tree | 098c9bf8181b91d7d1e0e69e88c4fabe0eb2e0d0 /test/functional/vimscript/executable_spec.lua | |
| parent | 5c156fdc6421fb4f342394319caf5d1f64cca915 (diff) | |
| download | rneovim-d945a93d69c994dd7a88629ac3a59034f1184631.tar.gz rneovim-d945a93d69c994dd7a88629ac3a59034f1184631.tar.bz2 rneovim-d945a93d69c994dd7a88629ac3a59034f1184631.zip | |
fix(autocmd): potential TabClosed UAF, always set abuf
Problem: win_free_mem can free w_buffer (via qf_free_all), which may cause a
heap use-after-free if used as TabClosed's <abuf>. I think TabClosed is also the
only event to conditionally set <abuf> not based on event type.
Solution: use the buffer saved by the bufref. Fall back to curbuf if invalid,
like WinResized/WinScrolled.
NOTE: Not always equivalent if close_buffer autocmds switch buffers at the last
moment; previously <abuf> would be set to that buffer. Fixed in next commit.
https://github.com/neovim/neovim/actions/runs/21765657455/job/62800643599?pr=37758#step:9:159
for an example of qf_free_all being a nuisance.
Diffstat (limited to 'test/functional/vimscript/executable_spec.lua')
0 files changed, 0 insertions, 0 deletions