Bug 1216696 (CVE-2023-46246)

Summary: VUL-0: CVE-2023-46246: vim: Integer Overflow in :history command
Product: [Novell Products] SUSE Security Incidents Reporter: SMASH SMASH <smash_bz>
Component: IncidentsAssignee: Security Team bot <security-team>
Status: REOPENED --- QA Contact: Security Team bot <security-team>
Severity: Minor    
Priority: P3 - Medium CC: gabriele.sonnu, martin.schreiner, stoyan.manolov, zbalogh
Version: unspecifiedFlags: stoyan.manolov: needinfo? (zbalogh)
Target Milestone: ---   
Hardware: Other   
OS: Other   
URL: https://smash.suse.de/issue/383340/
Whiteboard: CVSSv3.1:SUSE:CVE-2023-46246:4.0:(AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L)
Found By: Security Response Team Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description SMASH SMASH 2023-10-30 08:53:49 UTC
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.

References:
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2023-46246
Comment 1 Gabriele Sonnu 2023-10-30 08:54:54 UTC
Tracking as affected:

 - SUSE:ALP:Source:Standard:1.0/vim
 - SUSE:SLE-12:Update/vim
 - SUSE:SLE-15-SP5:Update/vim
 - SUSE:SLE-15:Update/vim
 - openSUSE:Factory/vim
Comment 2 Zoltan Balogh 2023-11-22 11:54:31 UTC
I have just started to prepare a new maintenance update to fix this issue.
Comment 5 Maintenance Automation 2023-11-24 20:30:22 UTC
SUSE-SU-2023:4560-1: An update that solves four vulnerabilities can now be installed.

Category: security (important)
Bug References: 1215940, 1216001, 1216167, 1216696
CVE References: CVE-2023-46246, CVE-2023-5344, CVE-2023-5441, CVE-2023-5535
Sources used:
SUSE Linux Enterprise High Performance Computing 12 SP5 (src): vim-9.0.2103-17.26.1
SUSE Linux Enterprise Server 12 SP5 (src): vim-9.0.2103-17.26.1
SUSE Linux Enterprise Server for SAP Applications 12 SP5 (src): vim-9.0.2103-17.26.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 6 Maintenance Automation 2023-11-24 20:30:29 UTC
SUSE-SU-2023:4557-1: An update that solves 10 vulnerabilities can now be installed.

Category: security (important)
Bug References: 1214922, 1214924, 1214925, 1215004, 1215006, 1215033, 1215940, 1216001, 1216167, 1216696
CVE References: CVE-2023-46246, CVE-2023-4733, CVE-2023-4734, CVE-2023-4735, CVE-2023-4738, CVE-2023-4752, CVE-2023-4781, CVE-2023-5344, CVE-2023-5441, CVE-2023-5535
Sources used:
openSUSE Leap 15.5 (src): vim-9.0.2103-150500.20.6.1
SUSE Linux Enterprise Micro 5.5 (src): vim-9.0.2103-150500.20.6.1
Basesystem Module 15-SP5 (src): vim-9.0.2103-150500.20.6.1
Desktop Applications Module 15-SP5 (src): vim-9.0.2103-150500.20.6.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 7 Maintenance Automation 2023-11-27 16:30:12 UTC
SUSE-SU-2023:4587-1: An update that solves four vulnerabilities can now be installed.

Category: security (important)
Bug References: 1215940, 1216001, 1216167, 1216696
CVE References: CVE-2023-46246, CVE-2023-5344, CVE-2023-5441, CVE-2023-5535
Sources used:
openSUSE Leap Micro 5.3 (src): vim-9.0.2103-150000.5.57.1
openSUSE Leap Micro 5.4 (src): vim-9.0.2103-150000.5.57.1
openSUSE Leap 15.4 (src): vim-9.0.2103-150000.5.57.1
SUSE Linux Enterprise Micro for Rancher 5.3 (src): vim-9.0.2103-150000.5.57.1
SUSE Linux Enterprise Micro 5.3 (src): vim-9.0.2103-150000.5.57.1
SUSE Linux Enterprise Micro for Rancher 5.4 (src): vim-9.0.2103-150000.5.57.1
SUSE Linux Enterprise Micro 5.4 (src): vim-9.0.2103-150000.5.57.1
Basesystem Module 15-SP4 (src): vim-9.0.2103-150000.5.57.1
Desktop Applications Module 15-SP4 (src): vim-9.0.2103-150000.5.57.1
SUSE Linux Enterprise High Performance Computing 15 SP1 LTSS 15-SP1 (src): vim-9.0.2103-150000.5.57.1
SUSE Linux Enterprise High Performance Computing 15 SP2 LTSS 15-SP2 (src): vim-9.0.2103-150000.5.57.1
SUSE Linux Enterprise High Performance Computing ESPOS 15 SP3 (src): vim-9.0.2103-150000.5.57.1
SUSE Linux Enterprise High Performance Computing LTSS 15 SP3 (src): vim-9.0.2103-150000.5.57.1
SUSE Linux Enterprise Server 15 SP1 LTSS 15-SP1 (src): vim-9.0.2103-150000.5.57.1
SUSE Linux Enterprise Server 15 SP2 LTSS 15-SP2 (src): vim-9.0.2103-150000.5.57.1
SUSE Linux Enterprise Server 15 SP3 LTSS 15-SP3 (src): vim-9.0.2103-150000.5.57.1
SUSE Linux Enterprise Server for SAP Applications 15 SP1 (src): vim-9.0.2103-150000.5.57.1
SUSE Linux Enterprise Server for SAP Applications 15 SP2 (src): vim-9.0.2103-150000.5.57.1
SUSE Linux Enterprise Server for SAP Applications 15 SP3 (src): vim-9.0.2103-150000.5.57.1
SUSE Enterprise Storage 7.1 (src): vim-9.0.2103-150000.5.57.1
SUSE CaaS Platform 4.0 (src): vim-9.0.2103-150000.5.57.1
SUSE Linux Enterprise Micro 5.1 (src): vim-9.0.2103-150000.5.57.1
SUSE Linux Enterprise Micro 5.2 (src): vim-9.0.2103-150000.5.57.1
SUSE Linux Enterprise Micro for Rancher 5.2 (src): vim-9.0.2103-150000.5.57.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 10 Martin Schreiner 2024-06-19 20:02:16 UTC
I don't think this bug is relevant anymore, as the following codestreams are all shipping Vim 9.1.0330 as of today:

SLE-12:Update
SLE-15-SP5:Update
SLE-15:Update

This CVE is also mentioned on its changelog, so the reference is not missing anywhere.
I'm closing it.
Comment 11 Martin Schreiner 2024-06-20 13:20:30 UTC
Reassigning to security.