<?xml version='1.0' encoding='UTF-8'?>
<?xml-stylesheet href="/static/style.xsl" type="text/xsl"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" version="2.0">
  <channel>
    <title>Most recent entries from all</title>
    <link>https://db.gcve.eu</link>
    <description>Contains only the most 10 recent entries.</description>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <generator>python-feedgen</generator>
    <language>en</language>
    <lastBuildDate>Thu, 05 Nov 2026 02:58:14 +0000</lastBuildDate>
    <item>
      <title>GHSA-259r-337f-4rfw — Compress/s2: Integer Overflow or Wraparound and Out-of-bounds Write in compress</title>
      <link>https://db.gcve.eu/vuln/ghsa-259r-337f-4rfw</link>
      <description>&lt;p&gt;&lt;strong&gt;Affected:&lt;/strong&gt; Go: github.com/klauspost/compress&lt;/p&gt;
&lt;p&gt;# Signed Integer Overflow in s2.NewDict&lt;/p&gt;
&lt;p&gt;## Summary&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;## Package&lt;/p&gt;
&lt;p&gt;- **Name:** `github.com/klauspost/compress/s2`
- **Ecosystem:** Go
- **Affected versions:** &amp;lt;= v1.18.6 (all versions with `NewDict` function)&lt;/p&gt;
&lt;p&gt;## Severity&lt;/p&gt;
&lt;p&gt;**High (7.5)** — CVSS v3.1: `AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`&lt;/p&gt;
&lt;p&gt;## Vulnerability&lt;/p&gt;
&lt;p&gt;### Type
- CWE-190: Integer Overflow or Wraparound
- CWE-787: Out-of-bounds Write (via unsafe.Pointer)&lt;/p&gt;
&lt;p&gt;### Description&lt;/p&gt;
&lt;p&gt;The `NewDict()` function reads a uvarint from dictionary data and converts it to `int`:&lt;/p&gt;
&lt;p&gt;```go
r, n := binary.Uvarint(dict)
// ...
d.repeat = int(r)
if d.repeat &amp;gt; len(dict) {
    return nil
}
```&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;When `Dict.Encode()` is called, the negative `repeat` value causes an integer overflow in `encodeBlockDictGo()`:&lt;/p&gt;
&lt;p&gt;```go
repeat := len(dict.dict) - dict.repeat  // overflows: 62 - (-5758978476775341977) = huge positive
candidate := len(dict.dict) - repeat + s // underflows to negative
load32(dict.dic…&lt;/p&gt;</description>
      <content:encoded>&lt;p&gt;&lt;strong&gt;Affected:&lt;/strong&gt; Go: github.com/klauspost/compress&lt;/p&gt;
&lt;p&gt;# Signed Integer Overflow in s2.NewDict&lt;/p&gt;
&lt;p&gt;## Summary&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;## Package&lt;/p&gt;
&lt;p&gt;- **Name:** `github.com/klauspost/compress/s2`
- **Ecosystem:** Go
- **Affected versions:** &amp;lt;= v1.18.6 (all versions with `NewDict` function)&lt;/p&gt;
&lt;p&gt;## Severity&lt;/p&gt;
&lt;p&gt;**High (7.5)** — CVSS v3.1: `AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`&lt;/p&gt;
&lt;p&gt;## Vulnerability&lt;/p&gt;
&lt;p&gt;### Type
- CWE-190: Integer Overflow or Wraparound
- CWE-787: Out-of-bounds Write (via unsafe.Pointer)&lt;/p&gt;
&lt;p&gt;### Description&lt;/p&gt;
&lt;p&gt;The `NewDict()` function reads a uvarint from dictionary data and converts it to `int`:&lt;/p&gt;
&lt;p&gt;```go
r, n := binary.Uvarint(dict)
// ...
d.repeat = int(r)
if d.repeat &amp;gt; len(dict) {
    return nil
}
```&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;When `Dict.Encode()` is called, the negative `repeat` value causes an integer overflow in `encodeBlockDictGo()`:&lt;/p&gt;
&lt;p&gt;```go
repeat := len(dict.dict) - dict.repeat  // overflows: 62 - (-5758978476775341977) = huge positive
candidate := len(dict.dict) - repeat + s // underflows to negative
load32(dict.dic…&lt;/p&gt;</content:encoded>
      <guid isPermaLink="false">https://db.gcve.eu/vuln/ghsa-259r-337f-4rfw</guid>
    </item>
  </channel>
</rss>
