Package: wv
Version: 1.2.9-9
Severity: normal
Tags: security, upstream

Hello,

I am reporting a reproducible crash in Debian wv 1.2.9-9 and upstream wvWare. 
This one is DoS-class rather than a write primitive, so I am filing it 
separately from the earlier reports.

`wvGetIntervalBounds()` ends with an unconditional pair of negative-capable 
indexes (decode_simple.c:758-759):

    *fcFirst = wvNormFC (rgfc[nopos - 2], NULL);
    *fcLim = wvNormFC (rgfc[nopos - 1], NULL);

When the loop above finds no bracket, `nopos` can be 0 or 1, so `nopos - 2` 
becomes -1 or -2 and the read runs in front of the `rgfc` array. In the 
attached sample the read lands on an address in the heap area (ASan: `SEGV on 
unknown address 0x60240000a0ec`) and the process dies.

Reproduction:

    wvRTF cand4.doc

ASan report (first frame):

    ERROR: AddressSanitizer: SEGV on unknown address 0x60240000a0ec
        #0 wvGetIntervalBounds decode_simple.c:758
        #1 wvGetSimpleParaBounds decode_simple.c:683
        #2 wvDecodeSimple decode_simple.c:398

Normal build: SIGSEGV, rc=139.

Suggested fix rejects the degenerate case before the tail reads:

    if (nopos < 2)
      {
          *fcFirst = 0;
          *fcLim = 0xffffffff;
          return (0);
      }

With the patch the sample returns 0 and normal documents keep byte-identical 
RTF output.

This is distinct from CVE-2026-112055 (`wvGetPAPX_FKP` / `wvGetCHPX_FKP`), 
CVE-2026-112056 (`wvGetSTSH`) and Debian Bug #1148725 (`pap.c` list indices); 
none of them indexes `rgfc` in `decode_simple.c`.

Confirmed impact is an out-of-bounds read through a computed negative index and 
process termination; code execution is not claimed.

Please assign a CVE if Debian considers this a vulnerability in the Debian 
package.

Thanks,
netwind
[email protected]

<<attachment: cand4.doc>>

Attachment: fix-nopos.patch
Description: fix-nopos.patch

Reply via email to