CVE-2026-139022: lib/842: reject output overflows from index and short data

Published Nov 30, 2026
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

lib/842: reject output overflows from index and short data

The output length passed to sw842decompress() is the caller's buffer capacity. Indexed copies write 2, 4 or 8 bytes and short-data templates write up to 7, but neither checks that capacity before writing and decrementing p->olen.

Overwriting an undersized destination then underflows p->olen, which is unsigned, so every later bounds check in the stream passes. Subsequent operations keep writing past the destination, and a matching CRC lets sw842decompress() return success with an output length larger than the capacity the caller supplied.

This is reachable through zram's compressed writeback path. With 842 selected, targeted corruption of the compressed data on its backing device made a KASAN kernel report vmalloc-out-of-bounds writes in doindex() and sw842decompress() when zram read the page back.

Check the remaining output before both operations and return -ENOSPC, matching the other output-producing templates.

Affected Software

1 affected component
Linux Linux kernel

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Compensating control

    In lib/842, check the remaining output capacity before indexed-copy and short-data operations, and return -ENOSPC if capacity is insufficient.

Event History

Nov 30, 2026
CVE Published
via MITRE·01:27 PM
Data Sourced
via MITRE·01:27 PM
Description

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203