Bug 32546 - vim new security issues CVE-2023-4823[1-7] and CVE-2023-48706
Summary: vim new security issues CVE-2023-4823[1-7] and CVE-2023-48706
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: Security (show other bugs)
Version: 9
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: QA Team
QA Contact: Sec team
URL:
Whiteboard: MGA9-64-OK
Keywords: advisory, validated_update
Depends on:
Blocks:
 
Reported: 2023-11-21 10:42 CET by Nicolas Salguero
Modified: 2023-12-08 12:57 CET (History)
5 users (show)

See Also:
Source RPM: vim-9.0.2087-1.mga9.src.rpm
CVE:
Status comment:


Attachments

Description Nicolas Salguero 2023-11-21 10:42:39 CET
Those CVEs were announced here:
https://www.openwall.com/lists/oss-security/2023/11/16/1

Mageia 8 and 9 are also affected.
Nicolas Salguero 2023-11-21 10:43:24 CET

CC: (none) => nicolas.salguero
Whiteboard: (none) => MGA9TOO, MGA8TOO
Source RPM: (none) => vim-9.0.2087-1.mga9.src.rpm

Nicolas Salguero 2023-11-21 10:46:01 CET

Status comment: (none) => Fixed upstream in 9.0.2112

Comment 1 Lewis Smith 2023-11-21 21:42:55 CET
Excuse me doing this, Nicolas, but you not only committed the current vim version, also many previous ones because of security issues.

CC: nicolas.salguero => (none)
Assignee: bugsquad => nicolas.salguero

Comment 2 Nicolas Salguero 2023-11-24 12:17:48 CET
CVE-2023-48706 was announced here:
https://www.openwall.com/lists/oss-security/2023/11/22/3

Status comment: Fixed upstream in 9.0.2112 => Fixed upstream in 9.0.2121
Summary: vim new security issues CVE-2023-4823[1-7] => vim new security issues CVE-2023-4823[1-7] and CVE-2023-48706
Assignee: nicolas.salguero => pkg-bugs

Comment 3 Nicolas Salguero 2023-11-27 15:26:49 CET
For Cauldron and Mageia 9, version 9.0.2130 is into SVN.
Comment 4 Nicolas Salguero 2023-11-30 13:49:10 CET Comment hidden (obsolete)

Whiteboard: MGA9TOO, MGA8TOO => (none)
Status comment: Fixed upstream in 9.0.2121 => (none)
Assignee: pkg-bugs => qa-bugs
Version: Cauldron => 9

Nicolas Salguero 2023-11-30 13:49:19 CET

Status: NEW => ASSIGNED

Comment 5 Marja Van Waes 2023-11-30 16:24:22 CET
Advisory from comment 4 added to SVN. Please remove the "advisory" keyword if it needs to be changed. It also helps when obsolete advisories are tagged as "obsolete"

CC: (none) => marja11
Keywords: (none) => advisory

Comment 6 Raphael Gertz 2023-12-01 17:58:27 CET
May we take this opportunity to include in this update the fix for haproxy config files paths ?

I updated SOURCES/vim-9.0-add-haproxy-syntax.patch and triggered a rebuild with this change.

Revert if it's not acceptable to include this fix.

Change in runtime/filetype.vim:
-+au BufNewFile,BufRead haproxy.conf,*/etc/haproxy/*.conf                setf haproxy
++au BufNewFile,BufRead */etc/haproxy/*.cfg,*/etc/haproxy/haproxy.conf setf haproxy

Revert and tell me if I need to create a separate bugfix update.

CC: (none) => mageia

Comment 7 Raphael Gertz 2023-12-01 18:00:29 CET
Suggested advisory:
========================

The updated packages fix security vulnerabilities:

When closing a window, vim may try to access already freed window structure. Exploitation beyond crashing the application has not been shown to be viable. (CVE-2023-48231)

A floating point exception may occur when calculating the line offset for overlong lines and smooth scrolling is enabled and the cpo-settings include the 'n' flag. This may happen when a window border is present and when the wrapped line continues on the next physical line directly in the window border because the 'cpo' setting includes the 'n' flag. Only users with non-default settings are affected and the exception should only result in a crash. (CVE-2023-48232)

If the count after the :s command is larger than what fits into a (signed) long variable, abort with e_value_too_large. Impact is low, user interaction is required and a crash may not even happen in all situations. (CVE-2023-48233)

When getting the count for a normal mode z command, it may overflow for large counts given. Impact is low, user interaction is required and a crash may not even happen in all situations. (CVE-2023-48234)

When parsing relative ex addresses one may unintentionally cause an overflow. Ironically this happens in the existing overflow check, because the line number becomes negative and LONG_MAX - lnum will cause the overflow. Impact is low, user interaction is required and a crash may not even happen in all situations. (CVE-2023-48235)

When using the z= command, the user may overflow the count with values larger than MAX_INT. Impact is low, user interaction is required and a crash may not even happen in all situations. (CVE-2023-48236)

In affected versions when shifting lines in operator pending mode and using a very large value, it may be possible to overflow the size of integer. Impact is low, user interaction is required and a crash may not even happen in all situations. (CVE-2023-48237)

When executing a `:s` command for the very first time and using a sub-replace-special atom inside the substitution part, it is possible that the recursive `:s` call causes free-ing of memory which may later then be accessed by the initial `:s` command. The user must intentionally execute the payload and the whole process is a bit tricky to do since it seems to work only reliably for the very first :s command. It may also cause a crash of Vim. (CVE-2023-48706)

The update fixes as well haproxy configuration paths used for syntax coloration.

References:
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-48231
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-48232
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-48233
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-48234
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-48235
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-48236
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-48237
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-48706
https://www.openwall.com/lists/oss-security/2023/11/16/1
https://www.openwall.com/lists/oss-security/2023/11/22/3
========================

Updated packages in core/updates_testing:
========================
vim-X11-9.0.2130-2.mga9
vim-common-9.0.2130-2.mga9
vim-enhanced-9.0.2130-2.mga9
vim-minimal-9.0.2130-2.mga9

from SRPM:
vim-9.0.2130-2.mga9.src.rpm
Comment 8 David GEIGER 2023-12-01 18:15:46 CET
@Raphael Gertz:

Please next time when you fix a MGA9 package use "%define subrel X" and not bumping the rel

%mkrel 1 -> %mkrel 2 = NOT VALID


But this YES VALID:

%define subrel 1
Release:   %mkrel 1


In a stable release this is the right mageia policy packaging.

Thanks in advance!

CC: (none) => geiger.david68210

Comment 9 Raphael Gertz 2023-12-01 18:53:27 CET
(In reply to David GEIGER from comment #8)
> @Raphael Gertz:
> 
> Please next time when you fix a MGA9 package use "%define subrel X" and not
> bumping the rel
> 
> %mkrel 1 -> %mkrel 2 = NOT VALID
> 
> 
> But this YES VALID:
> 
> %define subrel 1
> Release:   %mkrel 1
> 
> 
> In a stable release this is the right mageia policy packaging.
> 
> Thanks in advance!

Really sorry for my mistake.
Comment 10 katnatek 2023-12-02 00:23:13 CET
Tested in Real Hardware with Mageia 9 x86_64 lxqt

Current vim packages in my system

rpm -qa|grep vim
vim-minimal-9.0.2087-1.mga9
vim-common-9.0.2087-1.mga9

Updated without issues
Tested with some files

I don't search for POC
Comment 11 katnatek 2023-12-02 00:24:44 CET
(In reply to katnatek from comment #10)
> Tested in Real Hardware with Mageia 9 x86_64 lxqt
> 
> Current vim packages in my system
> 
> rpm -qa|grep vim
> vim-minimal-9.0.2087-1.mga9
> vim-common-9.0.2087-1.mga9
> 
> Updated without issues
> Tested with some files
> 
> I don't search for POC

After the update 
rpm -qa|grep vim
vim-common-9.0.2130-2.mga9
vim-minimal-9.0.2130-2.mga9
katnatek 2023-12-07 23:33:39 CET

Whiteboard: (none) => MGA9-64-OK

Comment 12 Thomas Andrews 2023-12-08 05:46:48 CET
Validating.

CC: (none) => andrewsfarm, sysadmin-bugs
Keywords: (none) => validated_update

Comment 13 Mageia Robot 2023-12-08 12:57:43 CET
An update for this issue has been pushed to the Mageia Updates repository.

https://advisories.mageia.org/MGASA-2023-0341.html

Status: ASSIGNED => RESOLVED
Resolution: (none) => FIXED


Note You need to log in before you can comment on or make changes to this bug.