Commit Graph

36 Commits

Author SHA1 Message Date
DavidKorczynski 3377581f8c
ghostscript: add two new vector device targets (#8358) 2022-08-26 12:28:32 +01:00
DavidKorczynski 77058c6f0e
ghostscript: extend with bmpmono device fuzzer (#8323) 2022-08-23 14:17:12 +01:00
DavidKorczynski 4ec2c13401
ghostscript: extend with eps2write device fuzzer (#8258)
* ghostscript: extend with eps2write device fuzzer

eps2write is one of the high-level devices currently not targeted by the
fuzzing suite. This adds a fuzzer for this high-level device.

* cleanup build
2022-08-15 15:43:12 +01:00
DavidKorczynski 6ce3dbb3d3
ghostscript: add psd and fax fuzzer (#8247) 2022-08-14 00:03:44 +01:00
DavidKorczynski a5352add98
ghostscript: add tiff fuzzer (#8012)
* ghostscript: add tiff fuzzer

Similar to all other devices with exception it writes to file instead of
/dev/null. This is needed because tiff writing requires seek abilities.
2022-07-14 23:59:09 +01:00
DavidKorczynski 3c04a4fab3
ghostscript: add three new devices fuzzers (#7981)
* ghostscript: add three new devices fuzzers

* nits

* simplify build
2022-07-09 21:10:48 +01:00
DavidKorczynski 1ae8bf7ee4
ghostscript: add target for new devices (#7912)
* ghostscript: add target for new devices

Adds ability to target various devices and a fuzzer that targets
pdfwrite and pxlmono devices. The primary device of interest here is
likely pdfwrite as it's more widely used as far as I know.

* fix review 1

* fix review 2

* nit

* nit
2022-06-28 14:44:17 +02:00
DavidKorczynski ccd918bb59
ghostscript: add targeted ps fuzzer (#7893)
* ghostscript: add targeted ps fuzzer

- Adds a new fuzzer that avoids PDF files
- Adds a dictionary with Postscript commands
2022-06-23 01:49:42 +01:00
DavidKorczynski 0a3b8f0cb4
ghostscript: extend fuzzing (#7821)
* ghostscript: extend fuzzing

- Add two new fuzzers
- One new fuzzer that explore multiple colorings
- One new fuzzer that focuses on PDF exploration
- Add dictionary to PDF fuzzer
- Add small sized PDF seed to PDF fuzzer
- Ensure max_len on multiple coloring fuzzing

* Add myself to auto_ccs

* Fix typo

* set indentation

* add options file

* Address review: split fuzzers and have dict + seed locally

* nit

* clarify prepending of single byte

* fix styling

* clarify comments in all_colors fuzzer

* Addess final review
2022-06-17 22:14:14 +01:00
chris-liddell fd772dcbb5
Fix 47322: Build failure - use latest freetype release (#7713) 2022-05-16 13:02:23 +01:00
chris-liddell ac38bd2e0b
Add Ken Sharp to the ghostscript project (#7012) 2021-12-14 10:22:01 +00:00
DavidKorczynski 365df31265
ghostscript: fix build (#7006)
* ghostscript: fix build

* ghostscript: limit to libfuzzer and honggfuzz

* set correct label in yaml
2021-12-11 10:58:56 +00:00
jonathanmetzman 806d1a0620
[Ubuntu upgrade] Disable MSAN where it doesn't support on Ubuntu 20.04 (#6281)
These projects were tested and it was found that their use
of MSAN does not work on Ubuntu 20.04. Therefore their use of
MSAN is being disabled.

Related: #6180
2021-08-24 15:24:47 -07:00
Sebastian Rasmussen 84178cd28f
[ghostscript] Make stderr quiet to avoid excessive output. (#5502) 2021-03-25 14:32:59 +00:00
Sebastian Rasmussen 919a35ae1f
[ghostscript] Copy fuzzer glue code to dir outside of git repo (#5501)
This makes it easier to build the fuzzer using a locally checked
out git repo without having to manually copy the fuzzer glue code
into the locally checked out git repo first.
2021-03-25 14:10:39 +00:00
chris-liddell ed1c6e38d8
Fix Freetype upstream repo address. (#4782) 2020-12-04 07:30:03 -08:00
Oliver Chang 29146813d4
Update project.yaml (#4493) 2020-09-28 15:16:55 +10:00
Kalvin 77a94ceb8b
projects/ghostscript: add contributor (#4333)
This change adds me (Kalvin) to the list of contributors allowed
to view Ghostscript issues on OSS-Fuzz.
2020-08-19 09:56:51 -07:00
devtty1er d561c49ae5
Update Dockerfiles (#4070)
* Use LABEL in place of MAINTAINER

* Remove LABEL maintainer from Dockerfiles
2020-07-06 13:18:23 -07:00
Sebastian Rasmussen f3955c875a
[ghostscript] Add another project member to the CC-list. (#3632) 2020-04-13 06:36:21 -07:00
Sebastian Rasmussen b96dd54183
[ghostscript] Make sure that all state kept in memory. (#3619)
The default setting allows for state to be temporarily saved to disk.
This is likely to interfere with the fuzzer's knowledge about state of data.
2020-04-11 06:13:26 -07:00
Sebastian Rasmussen 41c719f127
[ghostscript] Enable flag also used in valgrind builds. (#3620)
Valgrind may complain when software reads out partially uninitialized data
and stores it elsewhere, but only reads the initialized parts from this
latter location. The flag enables code that initializes all the data to
avoid valgrind reporting false positives. Presumably MSAN suffers from
similar issues so, try enabling this flag.
2020-04-11 06:13:02 -07:00
Sebastian Rasmussen e2e155fe0e
Update flags and enable new sanitizer (#3587)
* [ghostscript] Replace deprecated flag by current flag.

In old versions of Ghostscript the flag -dPARANOIDSAFER did
more checks than -dSAFER did. In modern versions the two flags
are identical. Moreover the flag -dPARANOIDSAFER has been
deprecated for a long time, and may be removed in the future.

In Ghostscript 9.50 and later -dSAFER is the default, and does
not have to be specified. To be able to test older yet still
modern Ghostscript versions without problems -dSAFER is used.

* [ghostscript] Force enable banding while rendering.

Ghostscript uses the set resolution to determine if banding should be
enabled during rendering, or not. Under normal circumstances documents
are rendered at maybe 600 DPI, but to conserve memory while running in
OSS-fuzz 200 DPI is used (-r200x200). To still test the banding code
used under normal circumstances banding is force enabled.

Moreover BufferSpace is used to determine the band height and thus the
number of bands. At 600 DPI this is normally 4Mbyte, so a reasonable
approximate at 200 DPI is 450k. Thus BufferSpace is also set.

* [ghostscript] Enable another sanitizer to see more issues.
2020-04-07 09:10:11 -07:00
Sebastian Rasmussen 96b94f6741
[ghostscript] Use official git server URL. (#3578)
This is the correct URL according to https://www.freetype.org/developer.html

This resolves the HTTP 502 error from the git server.
2020-04-03 07:29:23 -07:00
Sebastian Rasmussen 3b695b10de
[ghostscript] Build using the bundled tiff and jpeg libraries. (#3579)
The previous configuration tried to use the system tiff library with
the bundled jpeg library. That configuration is not supported by
Ghostscript.
2020-04-03 05:30:19 -07:00
Sebastian Rasmussen cd848bbd39
[ghostscript] Avoid printing raster output to stdout. (#3547)
Previously raster output data was printed on stdout. While this
is similar to how Ghostscript is run by CUPS's gstoraster filter it
unnecessarily prolongs execution time for many files.

Changing the output file still means that CUPS will be sent the
rasterized page and will be asked to convert it to a PWG raster which
it then dutifully writes to /dev/null. Thus no major difference is
expected in what code is executed in Ghostscript (or CUPS).

When run locally on a testcase found among the problematic files here:
gs://ghostscript-corpus.clusterfuzz-external.appspot.com/libFuzzer/
fuzzer target reported a timeout after 120 seconds before this commit.
After this commit the fuzzer target succeeded after about 3 seconds.
2020-03-27 13:32:10 -07:00
Max Moroz 71f4914c45
[presubmit] Enforce language attribute in project.yaml to be always set. (#3477)
* [presubmit] Enforce language attribute in projectt.yaml to be always set.

* Update documentation, better presubmit check, new project template.

* add docstring to templates.py

* Add example values in the project.yaml template and remove python value for now

* Add "project: c++" to 256 projects

* format

* Add labels and selective_unpack sections to the presubmit check

* fix incorrect auto_ccs format in three projects

* fix nss emails after rebase
2020-03-10 11:08:01 -07:00
Sebastian Rasmussen 65390a9774
[ghostscript] Relicense target fuzzer under Apache 2.0 license. (#3440)
When contributed to OSS-fuzz the Ghostscript target fuzzer was
licensed under a "BSD-style" license, referring to a LICENSE file
that actually contained an Apache 2.0 license! Recently the OSS-fuzz
project has added a presubmit check that validates the license of
each project's target fuzzer, causing the Ghostscript target fuzzer
to now fail the test. The Ghostscript target fuzzer therefore needs
to be relicensed under Apache 2.0.

This commit relicenses the existing target fuzzer code under
Apache 2.0 so that the Ghostscript target fuzzer code will pass
OSS-fuzz's presubmit checks allowing for further development.
2020-02-28 12:32:13 -08:00
Sebastian Rasmussen 879e06798f
[ghostscript] Add place holder program name. (#3438)
The first element in the argument array to gsapi_new_instance()
is ignored since it normally is the program name. This means that
the commit introducing the "-K" argument to limit memory usage did
not have its intended effect since the "-K" argument was ignored.
Moreover, prior to that the resolution argument "-r200x200" was
being unintentionally ignored. By introducing a place holder program
name all arguments are taken into account and the reader is reminded
that the first argument is the program name.
2020-02-27 12:29:14 -08:00
Sean Kau e3de965fa9
Add additional maintainers from Artifex (#3435) 2020-02-26 16:51:54 -08:00
Sean Kau 8e2d57684b Switch Ghostscript to upstream freetype (#3286)
* Switch to freetype library.

Reintegrate freetype

* remove pkg-config dependency
2020-01-22 18:24:10 -08:00
Sebastian Rasmussen 198345dc17 [ghostscript] Limit ghostscript memory usage to 1Gbyte. (#2890) 2019-09-26 08:35:13 -07:00
Sean Kau 86f5130543 [ghostscript] Run ./autogen.sh instead of autoconf and add $ORIGIN to rpath (#2564)
* Run ./autogen.sh instead of autoconf.
* Add $ORIGIN to the rpath
2019-07-03 09:56:39 -07:00
Benjamin Gordon 8934ff6f8b Two fixes for ghostcript (#2562)
* [ghostscript] Fix ininitialized pointer

Passing an invalid pointer causes a crash in gs_new_instance.

* [ghostscript] Add seed corpus

Use the examples distributed with ghostcript as a seed corpus.
2019-07-02 07:38:50 -07:00
Sean Kau ad63d0e0ed Add upstream maintainer for ghostscript (#2549) 2019-06-28 14:43:09 -07:00
Benjamin Gordon 9b715c91c2 [ghostscript] New project: ghostscript (#2544) 2019-06-27 09:59:20 -07:00