<?xml version='1.0' encoding='UTF-8'?>
<?xml-stylesheet href="/static/style.xsl" type="text/xsl"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
  <id>https://db.gcve.eu/rss/recent/all/10</id>
  <title>Most recent entries from all</title>
  <updated>2026-11-05T02:57:22.711117+00:00</updated>
  <author>
    <name>Vulnerability-Lookup</name>
    <email>info@gcve.eu</email>
  </author>
  <link href="https://db.gcve.eu" rel="alternate"/>
  <generator uri="https://lkiesow.github.io/python-feedgen" version="1.0.0">python-feedgen</generator>
  <subtitle>Contains only the most 10 recent entries.</subtitle>
  <entry>
    <id>https://db.gcve.eu/vuln/ghsa-259r-337f-4rfw</id>
    <title>GHSA-259r-337f-4rfw — Compress/s2: Integer Overflow or Wraparound and Out-of-bounds Write in compress</title>
    <updated>2026-11-05T02:57:22.711954+00:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml"><p><strong>Affected:</strong> Go: github.com/klauspost/compress</p>
<p># Signed Integer Overflow in s2.NewDict</p>
<p>## Summary</p>
<p>A signed integer overflow vulnerability in `s2.NewDict()` allows an attacker to bypass repeat index validation by supplying a dictionary with a uvarint-encoded repeat value exceeding `MaxInt64`. When `Dict.Encode()` is subsequently called, the overflowed negative repeat value causes an out-of-bounds memory access via `unsafe.Pointer` arithmetic, crashing the process with SIGSEGV.</p>
<p>## Package</p>
<p>- **Name:** `github.com/klauspost/compress/s2`
- **Ecosystem:** Go
- **Affected versions:** &lt;= v1.18.6 (all versions with `NewDict` function)</p>
<p>## Severity</p>
<p>**High (7.5)** — CVSS v3.1: `AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`</p>
<p>## Vulnerability</p>
<p>### Type
- CWE-190: Integer Overflow or Wraparound
- CWE-787: Out-of-bounds Write (via unsafe.Pointer)</p>
<p>### Description</p>
<p>The `NewDict()` function reads a uvarint from dictionary data and converts it to `int`:</p>
<p>```go
r, n := binary.Uvarint(dict)
// ...
d.repeat = int(r)
if d.repeat &gt; len(dict) {
    return nil
}
```</p>
<p>When `r` exceeds `MaxInt64` (9223372036854775807), `int(r)` overflows to a negative value. Since a negative number is never greater than a positive length, the validation check is bypassed.</p>
<p>When `Dict.Encode()` is called, the negative `repeat` value causes an integer overflow in `encodeBlockDictGo()`:</p>
<p>```go
repeat := len(dict.dict) - dict.repeat  // overflows: 62 - (-5758978476775341977) = huge positive
candidate := len(dict.dict) - repeat + s // underflows to negative
load32(dict.dic…</p></div>
    </content>
    <link href="https://db.gcve.eu/vuln/ghsa-259r-337f-4rfw"/>
  </entry>
</feed>
