Skip to content
OpenAdvisories
Medium · 4.0 CVE-2023-46246 EUVD-2023-50477

Integer Overflow in :history command in Vim

Published Oct 27, 2023 · Updated Jun 23, 2026 · Assigned by GitHub_M

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 products

VendorProductAffectedFixed
vim vim <= 9.0.2067 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 vim 2:9.0.2087-1 —
Debian 13 vim 2:9.0.2087-1 —
Debian 12 vim No fix yet —
ReleasePackageFixed inAdvisory
Ubuntu 22.04 LTS vim 2:8.2.3995-1ubuntu2.15 USN-6557-1
Ubuntu 20.04 LTS vim 2:8.1.2269-1ubuntu5.21 USN-6557-1
Show 3 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu Pro 18.04 LTS vim 2:8.0.1453-1ubuntu1.13+esm7 USN-6557-1
Ubuntu Pro 16.04 LTS vim 2:7.4.1689-3ubuntu1.5+esm22 USN-6557-1
Ubuntu Pro 14.04 LTS vim 2:7.4.052-1ubuntu3.1+esm15 USN-6557-1
ReleasePackageFixed inAdvisory
SLES 15 SP5 vim 9.0.2103-150500.20.6.1 SUSE-SU-2023:4557-1
SLES 15 SP4 vim 9.0.2103-150000.5.57.1 SUSE-SU-2023:4587-1
SLES 15 SP3 vim 9.0.2103-150000.5.57.1 SUSE-SU-2023:4587-1
SLES 15 SP2 vim 9.0.2103-150000.5.57.1 SUSE-SU-2023:4587-1
SLES 15 SP1 vim 9.0.2103-150000.5.57.1 SUSE-SU-2023:4587-1
Show 14 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
SLES 12 SP5 vim 9.0.2103-17.26.1 SUSE-SU-2023:4560-1
SLES for SAP 15 SP3 vim 9.0.2103-150000.5.57.1 SUSE-SU-2023:4587-1
SLES for SAP 15 SP2 vim 9.0.2103-150000.5.57.1 SUSE-SU-2023:4587-1
SLES for SAP 15 SP1 vim 9.0.2103-150000.5.57.1 SUSE-SU-2023:4587-1
SLES for SAP 12 SP5 vim 9.0.2103-17.26.1 SUSE-SU-2023:4560-1
SLE Micro 5.5 vim 9.0.2103-150500.20.6.1 SUSE-SU-2023:4557-1
SLE Micro 5.4 vim 9.0.2103-150000.5.57.1 SUSE-SU-2023:4587-1
SLE Micro 5.3 vim 9.0.2103-150000.5.57.1 SUSE-SU-2023:4587-1
SLE Micro 5.2 vim 9.0.2103-150000.5.57.1 SUSE-SU-2023:4587-1
SLE Micro 5.1 vim 9.0.2103-150000.5.57.1 SUSE-SU-2023:4587-1
SLE HPC 15 SP3 vim 9.0.2103-150000.5.57.1 SUSE-SU-2023:4587-1
SLE HPC 15 SP2 vim 9.0.2103-150000.5.57.1 SUSE-SU-2023:4587-1
SLE HPC 15 SP1 vim 9.0.2103-150000.5.57.1 SUSE-SU-2023:4587-1
SUSE Enterprise Storage 7.1 vim 9.0.2103-150000.5.57.1 SUSE-SU-2023:4587-1
ReleasePackageFixed inAdvisory
openSUSE Leap 15.5 vim 9.0.2103-150500.20.6.1 SUSE-SU-2023:4557-1
openSUSE Leap 15.4 vim 9.0.2103-150000.5.57.1 SUSE-SU-2023:4587-1
Show 2 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
openSUSE Leap Micro 5.4 vim 9.0.2103-150000.5.57.1 SUSE-SU-2023:4587-1
openSUSE Leap Micro 5.3 vim 9.0.2103-150000.5.57.1 SUSE-SU-2023:4587-1

Amazon Linux

ReleasePackageFixed inAdvisory
Amazon Linux 2023 xxd +6 2:9.0.2081-1.amzn2023 ALAS2023-2023-431
Amazon Linux 2 xxd +6 2:9.0.2081-1.amzn2.0.1 ALAS2-2023-2338

Azure Linux

ReleasePackageFixed inAdvisory
Azure Linux 2 (CBL-Mariner) vim 9.0.2112-1 —

Advisories 8

References