summaryrefslogtreecommitdiff
path: root/Meta/Lagom/Fuzzers
AgeCommit message (Collapse)Author
2023-05-24Fuzzers: Unbreak FuzzHttpRequestimplicitfield
Previously, the exit condition was inverted, causing the fuzzer to try to read the value of an error.
2023-05-23test-fuzz: Add all the missing fuzzersTim Schumacher
2023-05-23Lagom: Extract the list of fuzzing targets to a separate fileTim Schumacher
2023-05-19Fuzzers: Add a fuzzer for roundtrip LZMA compression/decompressionTim Schumacher
2023-05-12LibGfx+Fuzz: Convert ImageDecoder::initialize to ErrorOrBen Wiederhake
This prevents callers from accidentally discarding the result of initialize(), which was the root cause of this OSS Fuzz bug: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=55896&q=label%3AProj-serenity&sort=summary
2023-04-12Fuzzers: Stop loading audio frames once the end is reachedTim Schumacher
Previously, the condition was reversed, so we would stop immediately on a file that has at least one working chunk, and we would infinitely loop on a file with no chunks.
2023-04-09Everywhere: Remove unused DeprecatedString includesBen Wiederhake
2023-04-08Fuzzers: Add a WebP fuzzerNico Weber
2023-04-06LibTLS: Change Certificate parsing to use ErrorOrstelar7
Loads of changes that are tightly connected... :/ * Change lambdas to static functions * Add spec docs to those functions * Keep the current scope around as a parameter * Add wrapping classes for some Certificate members * Parse ec and ecdsa data from certificates
2023-03-26LibHTTP+WebDriver+WebServer: Return error from HTTP request parserAliaksandr Kalenik
2023-03-21LibGfx: Move all image loaders and writers to a subdirectoryLucas CHOLLET
2023-03-20Lagom: Add a fuzzer for LZMA decompressionTim Schumacher
2023-03-19Fuzzers: Use correct type name in FuzzilliJs fuzzerAndrew Kaster
2023-03-19Meta: Move global VM creation to fuzzer "global" structureTimothy Flynn
Turns out LLVMFuzzerTestOneInput may be called more than once per process.
2023-03-18Fuzzers: Skip trying to parse invalid UTF-8 in LibJS FuzzersAndrew Kaster
Invalid UTF-8 crashes JS::Script::Parse.
2023-03-17Meta: Ensure the main thread VM is created before use in the CSS fuzzerTimothy Flynn
2023-03-17LibJS: Propagate errors from VM creationTimothy Flynn
2023-03-13LibAudio: Move audio stream buffering into the loaderkleines Filmröllchen
Before, some loader plugins implemented their own buffering (FLAC&MP3), some didn't require any (WAV), and some didn't buffer at all (QOA). This meant that in practice, while you could load arbitrary amounts of samples from some loader plugins, you couldn't do that with some others. Also, it was ill-defined how many samples you would actually get back from a get_more_samples call. This commit fixes that by introducing a layer of abstraction between the loader and its plugins (because that's the whole point of having the extra class!). The plugins now only implement a load_chunks() function, which is much simpler to implement and allows plugins to play fast and loose with what they actually return. Basically, they can return many chunks of samples, where one chunk is simply a convenient block of samples to load. In fact, some loaders such as FLAC and QOA have separate internal functions for loading exactly one chunk. The loaders *should* load as many chunks as necessary for the sample count to be reached or surpassed (the latter simplifies loading loops in the implementations, since you don't need to know how large your next chunk is going to be; a problem for e.g. FLAC). If a plugin has no problems returning data of arbitrary size (currently WAV), it can return a single chunk that exactly (or roughly) matches the requested sample count. If a plugin is at the stream end, it can also return less samples than was requested! The loader can handle all of these cases and may call into load_chunk multiple times. If the plugin returns an empty chunk list (or only empty chunks; again, they can play fast and loose), the loader takes that as a stream end signal. Otherwise, the loader will always return exactly as many samples as the user requested. Buffering is handled by the loader, allowing any underlying plugin to deal with any weird sample count requirement the user throws at it (looking at you, SoundPlayer!). This (not accidentally!) makes QOA work in SoundPlayer.
2023-03-10Meta/Lagom: Add a fuzzer for QOAkleines Filmröllchen
2023-03-09LibIMAP: Propagate OOM errors from decode_quoted_printable()Linus Groh
2023-02-25Meta: Allow disabling LibWeb fuzzerskleines Filmröllchen
The LibWeb fuzzer build is really slow, so for local builds it is useful to disable it when you're not interested in running that fuzzer. Co-authored-by: Andrew Kaster <akaster@serenityos.org>
2023-02-19LibTextCodec+Everywhere: Port Decoders to new StringsSam Atkins
2023-02-19LibTextCodec+Everywhere: Return Optional<Decoder&> from `decoder_for()`Sam Atkins
2023-02-18LibGfx: Rename `JPGLoader` to `JPEGLoader`Lucas CHOLLET
The patch also contains modifications on several classes, functions or files that are related to the `JPGLoader`. Renaming include: - JPGLoader{.h, .cpp} - JPGImageDecoderPlugin - JPGLoadingContext - JPG_DEBUG - decode_jpg - FuzzJPGLoader.cpp - Few string literals or texts
2023-02-15LibTextCodec+Everywhere: Make TextCodec::decoder_for() take a StringViewSam Atkins
We don't need a full String/DeprecatedString inside this function, so we might as well not force users to create one.
2023-02-13Meta: Add a `Shell --posix` parser fuzzerAli Mohammad Pur
2023-02-13LibCore: Remove `Stream.h`Tim Schumacher
2023-02-08AK: Remove the fallible constructor from `FixedMemoryStream`Tim Schumacher
2023-01-29AK: Move memory streams from `LibCore`Tim Schumacher
2023-01-29LibJS+Everywhere: Allow Cell::initialize overrides to throw OOM errorsTimothy Flynn
Note that as of this commit, there aren't any such throwers, and the call site in Heap::allocate will drop exceptions on the floor. This commit only serves to change the declaration of the overrides, make sure they return an empty value, and to propagate OOM errors frm their base initialize invocations.
2023-01-28LibAudio: Remove `try_` prefix from fallible LoaderPlugin methodsLinus Groh
2023-01-28LibGfx: Move ICCProfile.{h,cpp} to ICC/Profile.{h,cpp}Nico Weber
2023-01-25LibWasm: Port the parser to `Core::Stream`Tim Schumacher
2023-01-20LibGfx: Re-structure the whole initialization pattern for image decodersLiav A
When trying to figure out the correct implementation, we now have a very strong distinction on plugins that are well suited for sniffing, and plugins that need a MIME type to be chosen. Instead of having multiple calls to non-static virtual sniff methods for each Image decoding plugin, we have 2 static methods for each implementation: 1. The sniff method, which in contrast to the old method, gets a ReadonlyBytes parameter and ensures we can figure out the result with zero heap allocations for most implementations. 2. The create method, which just creates a new instance so we don't expose the constructor to everyone anymore. In addition to that, we have a new virtual method called initialize, which has a per-implementation initialization pattern to actually ensure each implementation can construct a decoder object, and then have a correct context being applied to it for the actual decoding.
2023-01-18FuzzilliJs: Print the result of JS::Value::to_string using AK::outlnTimothy Flynn
JS::Value::to_string now returns a String, which does not have a null- terminated characters() accessor.
2023-01-17Lagom/Fuzzers: Add fuzzer for ICCProfileNico Weber
2023-01-15Lagom/Fuzzers: Add fuzzer for the TGALoader codeLiav A
2023-01-08LibArchive+Utilities: Stop using DeprecatedStringimplicitfield
This also slightly improves error propagation in tar, unzip and zip.
2023-01-03Lagom: Fix up a missed usage of `Compress::Zlib` in the fuzzersTim Schumacher
2022-12-21LibGfx: Rename TTF/TrueType to OpenTypeAndreas Kling
OpenType is the backwards-compatible successor to TrueType, and the format we're actually parsing in LibGfx. So let's call it that.
2022-12-15LibCore: Rename `MemoryStream` to `FixedMemoryStream`Tim Schumacher
This is to differentiate between the upcoming `AllocatingMemoryStream`, which automatically allocates memory as needed instead of operating on a static memory area.
2022-12-12LibCore: Rename `Stream::read_all` to `read_until_eof`Tim Schumacher
This generally seems like a better name, especially if we somehow also need a better name for "read the entire buffer, but not the entire file" somewhere down the line.
2022-12-10Meta: Return 0 from the fuzzing function in most casesTim Schumacher
LibFuzzer documentation [1] states that all return values except for 0 and -1 are currently reserved for future use. -1 is a special return value that causes LibFuzzer to not add a testing input to the testing corpus, regardless of the code coverage that it causes. [1] https://llvm.org/docs/LibFuzzer.html
2022-12-10LibCompress: Port GzipDecompressor to `Core::Stream`Tim Schumacher
2022-12-06AK+Everywhere: Rename String to DeprecatedStringLinus Groh
We have a new, improved string type coming up in AK (OOM aware, no null state), and while it's going to use UTF-8, the name UTF8String is a mouthful - so let's free up the String name by renaming the existing class. Making the old one have an annoying name will hopefully also help with quick adoption :^)
2022-12-05LibAudio: Switch LoaderPlugin to a more traditional constructor patternTim Schumacher
This now prepares all the needed (fallible) components before actually constructing a LoaderPlugin object, so we are no longer filling them in at an arbitrary later point in time.
2022-11-30LibCore: Add support for ReadonlyBytes to MemoryStreamTim Schumacher
2022-11-30LibArchive: Move loading the next tar header into a helper functionTim Schumacher
This now also validates the first header that is loaded, so we can drop the corresponding FIXME from `tar`.
2022-11-30LibArchive: Use Core::Stream inside `TarInputStream`Tim Schumacher
2022-11-26FuzzTar+tar: Advance the stream before continuingimplicitfield
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=53733 This bug was caused by a regression introduced in c88d8a2.