Skip to content
This repository was archived by the owner on Mar 10, 2026. It is now read-only.
This repository was archived by the owner on Mar 10, 2026. It is now read-only.

rastertoepson: heap buffer overflow #4600

Closed

Description

@michaelrsweet

Version: 2.0-current
CUPS.org User: pdewacht

In the rastertoepson filter, a malformed raster file can cause the CompressData function write beyond the end of the CompBuffer buffer.

This can be remotely triggered on a print server that shares a printer that uses the rastertoepson filter. Sample file attached.

Found using afl-fuzz.

Activity

  1. michaelrsweet commented on Mar 25, 2015

    @michaelrsweet
    ContributorAuthor

    CUPS.org User: mike

    Fixed in Subversion repository.

  2. michaelrsweet commented on Mar 25, 2015

    @michaelrsweet
    ContributorAuthor

    "str4600.patch":

    Index: filter/rastertoepson.c

    --- filter/rastertoepson.c (revision 12567)
    +++ filter/rastertoepson.c (working copy)
    @@ -274,7 +274,7 @@

    if (header->cupsCompression || DotBytes)
    {

    • if ((CompBuffer = calloc(2, header->cupsWidth)) == NULL)
    • if ((CompBuffer = calloc(2, header->cupsWidth + 1)) == NULL)
      {
      fputs("ERROR: Unable to allocate memory\n", stderr);
      exit(1);
  3. added this to the Stable milestone on Mar 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions