<?xml version="1.0" encoding="utf-8"?>
  <?xml-stylesheet type="text/xsl" href="sa-render.xsl"?>
  <update from="huaweicloud.com" type="security" status="stable" version="1">
    <id>HCE2-SA-2024-0302</id>
    <title>An update for vim is now available for HCE 2.0</title>
    <severity>Moderate</severity>
    <release>HCE 2.0</release>
    <issued date="2024-11-19 07:40:47"/>
    <updated date="2024-11-19 07:40:47"/>
    <references>
      <reference href="https://nvd.nist.gov/vuln/detail/CVE-2024-43802" id="CVE-2024-43802" title="CVE-2024-43802 Base Score: 4.5 Vector: CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L" type="cve"/>
      <reference href="https://nvd.nist.gov/vuln/detail/CVE-2024-43374" id="CVE-2024-43374" title="CVE-2024-43374 Base Score: 4.5 Vector: CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L" type="cve"/>
      <reference href="https://nvd.nist.gov/vuln/detail/CVE-2024-47814" id="CVE-2024-47814" title="CVE-2024-47814 Base Score: 3.9 Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:N/I:L/A:L" type="cve"/>
    </references>
    <description>Security Fix(es):

Vim is an improved version of the unix vi text editor. When flushing the typeahead buffer, Vim moves the current position in the typeahead buffer but does not check whether there is enough space left in the buffer to handle the next characters.  So this may lead to the tb_off position within the typebuf variable to point outside of the valid buffer size, which can then later lead to a heap-buffer overflow in e.g. ins_typebuf(). Therefore, when flushing the typeahead buffer, check if there is enough space left before advancing the off position. If not, fall back to flush current typebuf contents. It_x27;s not quite clear yet, what can lead to this situation. It seems to happen when error messages occur (which will cause Vim to flush the typeahead buffer) in comnination with several long mappgins and so it may eventually move the off position out of a valid buffer size. Impact is low since it is not easily reproducible and requires to have several mappings active and run into some error condition. But when this happens, this will cause a crash. The issue has been fixed as of Vim patch v9.1.0697. Users are advised to upgrade. There are no known workarounds for this issue. (CVE-2024-43802)

The UNIX editor Vim prior to version 9.1.0678 has a use-after-free error in argument list handling. When adding a new file to the argument list, this triggers `Buf*` autocommands. If in such an autocommand the buffer that was just opened is closed (including the window where it is shown), this causes the window structure to be freed which contains a reference to the argument list that we are actually modifying. Once the autocommands are completed, the references to the window and argument list are no longer valid and as such cause an use-after-free. Impact is low since the user must either intentionally add some unusual autocommands that wipe a buffer during creation (either manually or by sourcing a malicious plugin), but it will crash Vim. The issue has been fixed as of Vim patch v9.1.0678. (CVE-2024-43374)

Vim is an open source, command line text editor. A use-after-free was found in Vim &lt; 9.1.0764. When closing a buffer (visible in a window) a BufWinLeave auto command can cause an use-after-free if this auto command happens to re-open the same buffer in a new split window. Impact is low since the user must have intentionally set up such a strange auto command and run some buffer unload commands. However this may lead to a crash. This issue has been addressed in version 9.1.0764 and all users are advised to upgrade. There are no known workarounds for this vulnerability. (CVE-2024-47814)
</description>
    <pkglist>
      <collection short="HCE 2.0" package="vim">
        <name>HCE 2.0</name>
        <package arch="aarch64" name="vim-common" version="9.0" release="1.r29.hce2">
          <filename>vim-common-9.0-1.r29.hce2.aarch64.rpm</filename>
        </package>
        <package arch="aarch64" name="vim-enhanced" version="9.0" release="1.r29.hce2">
          <filename>vim-enhanced-9.0-1.r29.hce2.aarch64.rpm</filename>
        </package>
        <package arch="noarch" name="vim-filesystem" version="9.0" release="1.r29.hce2">
          <filename>vim-filesystem-9.0-1.r29.hce2.noarch.rpm</filename>
        </package>
        <package arch="aarch64" name="vim-minimal" version="9.0" release="1.r29.hce2">
          <filename>vim-minimal-9.0-1.r29.hce2.aarch64.rpm</filename>
        </package>
        <package arch="x86_64" name="vim-common" version="9.0" release="1.r29.hce2">
          <filename>vim-common-9.0-1.r29.hce2.x86_64.rpm</filename>
        </package>
        <package arch="x86_64" name="vim-enhanced" version="9.0" release="1.r29.hce2">
          <filename>vim-enhanced-9.0-1.r29.hce2.x86_64.rpm</filename>
        </package>
        <package arch="x86_64" name="vim-minimal" version="9.0" release="1.r29.hce2">
          <filename>vim-minimal-9.0-1.r29.hce2.x86_64.rpm</filename>
        </package>
      </collection>
    </pkglist>
  </update>
