Vulnerability · Published Oct 27, 2023 · Assigned by GitHub_M
CVE-2023-46246Integer Overflow in :history command in Vim
Medium 4.0
In plain English
A medium-severity use-after-free in vim from vim. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.4% (higher than 33% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
Vim is an improved version of the good old UNIX editor Vi. Heap-use-after-free in memory allocated in the function `ga_grow_inner` in in the file `src/alloc.c` at line 748, which is freed in the file `src/ex_docmd.c` in the function `do_cmdline` at line 1010 and then used again in `src/cmdhist.c` at line 759. When using the `:history` command, it's possible that the provided argument overflows the accepted value. Causing an Integer Overflow and potentially later an use-after-free. This vulnerability has been patched in version 9.0.2068.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | vim | no fix listed | DEBIAN-CVE-2023-46246 |
| Debian:13 | vim | 2:9.0.2087-1 | DEBIAN-CVE-2023-46246 |
| Debian:14 | vim | 2:9.0.2087-1 | DEBIAN-CVE-2023-46246 |
| Ubuntu:22.04:LTS | vim | 2:8.2.3995-1ubuntu2.15 | USN-6557-1 |
| Ubuntu:22.04:LTS | vim | 2:8.2.3995-1ubuntu2.15 | UBUNTU-CVE-2023-46246 |
Affected products (as reported)
Weakness: CWE-416, CWE-190 · Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
References
- https://github.com/vim/vim/security/advisories/GHSA-q22m-h7m2-9mgm x_refsource_CONFIRM
- https://github.com/vim/vim/commit/9198c1f2b1ddecde22af918541e0de2a32f0f45a x_refsource_MISC
- https://security.netapp.com/advisory/ntap-20231208-0006/
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/DNMFS3IH74KEMMESOA3EOB6MZ56TWGFF/
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/IVA7K73WHQH4KVFDJQ7ELIUD2WK5ZT5E/