Nick Wellnhofer
72f84dd739
fuzz: Inject IO failures into serialization code
2024-12-17 22:21:34 +01:00
Nick Wellnhofer
9f652e57c1
fuzz: Inject IO failures
...
We use the same counter for injecting malloc and IO failures. This
mostly renames several functions and variables.
2024-11-26 14:30:54 +01:00
Nick Wellnhofer
754843abda
fuzz: Remove xmlFuzzEntityLoader
...
Unused after commit de0c7791 .
2024-11-26 14:30:54 +01:00
Rosen Penev
5d542feff1
libxml: define ATTRIBUTE_UNUSED for clang
...
Silences warnings under Clang on Windows.
Signed-off-by: Rosen Penev <rosenp@gmail.com >
2024-06-20 15:24:15 -07:00
Nick Wellnhofer
208f27f964
include: Don't define ATTRIBUTE_UNUSED in public header
...
Stop polluting namespace with unprefixed names.
2024-06-15 19:13:08 +02:00
Nick Wellnhofer
5238404325
parser: Pass resource type to resource loader
2024-06-12 16:36:12 +02:00
Nick Wellnhofer
780e432a5c
fuzz: Move to per-context error handler
2024-06-12 16:36:12 +02:00
Nick Wellnhofer
116d8c0166
fuzz: Move to per-context resource loader
2024-06-12 16:36:12 +02:00
Nick Wellnhofer
caa8bb3848
fuzz: Move back to xmlSetExternalEntityLoader
...
xmlParserInputBufferCreateFilenameDefault can't report malloc failures.
2024-05-19 19:39:22 +02:00
Nick Wellnhofer
b3cb41be8b
fuzz: Add xmllint fuzzer
2024-05-13 12:50:08 +02:00
Nick Wellnhofer
b62ccf7f10
fuzz: Add fuzzer for XML reader API
2024-04-22 12:44:12 +02:00
Nick Wellnhofer
ee0c1f87c0
fuzz: New tree API fuzzer
2024-03-15 19:54:27 +01:00
Nick Wellnhofer
da996c8d0f
uri: Report malloc failures
...
Fix many places where malloc failures weren't reported, for example
after calling xmlStrdup.
Introduce new public API functions that return a separate error code if
a memory allocation fails:
- xmlParseURISafe
- xmlBuildURISafe
- xmlBuildRelativeURISafe
Update the fuzzer to check whether malloc failures are reported.
2023-12-11 22:05:47 +01:00
Nick Wellnhofer
b7d56ef7f1
malloc-fail: Report malloc failure in xmlRegEpxFromParse
...
Also check whether malloc failures are reported when fuzzing.
2023-09-22 19:53:11 +02:00
Nick Wellnhofer
f9d717af97
fuzz: Allow to fuzz without push, reader or output modules
2023-09-21 13:05:49 +02:00
Nick Wellnhofer
da274bfa55
build: Fix build when certain modules are disabled
2023-09-21 02:26:43 +02:00
Nick Wellnhofer
4eba9f9cfc
fuzz: Separate fuzzer for DTD validation
2023-03-12 16:19:33 +01:00
Nick Wellnhofer
42322eba82
fuzz: Inject random malloc failures
...
Fixes #344 .
2023-03-08 14:14:22 +01:00
Nick Wellnhofer
541b1e2850
fuzz: Support variable integer sizes in fuzz data
...
Also switch to big-endian.
2023-03-08 13:59:00 +01:00
Nick Wellnhofer
09dac45ab9
fuzz: Add separate XInclude fuzzer
...
XIncludes involve XPath processing which can still lead to timeouts when
fuzzing. This will probably take a while to fix. The rest of the XML
parsing code should hopefully run without timeouts now. OSS-Fuzz only
shows a single timeout test case, so separate the XInclude from the core
XML fuzzer.
2022-12-26 18:12:26 +01:00
Nick Wellnhofer
f9ccb3b818
Check for feature flags in fuzzer tests
2021-02-22 22:29:28 +01:00
Nick Wellnhofer
0d5f3710fb
Consolidate seed corpus generation
...
Implement file handling in C to speed up corpus generation.
2020-08-24 21:14:55 +02:00
Nick Wellnhofer
0d9da0290c
Test fuzz targets with dummy driver
...
Run fuzz targets with files in seed corpus during test.
2020-08-24 03:57:03 +02:00
Nick Wellnhofer
ad26a60f95
Add XPath and XPointer fuzzer
2020-08-06 14:12:32 +02:00
Nick Wellnhofer
eac1c7e2e5
Fuzz target for XML Schemas
...
This only tests the schema parser for now.
2020-06-23 16:20:27 +02:00
Nick Wellnhofer
ffd31dbefd
Move entity recorder to fuzz.c
2020-06-21 12:15:46 +02:00
Nick Wellnhofer
536f421d37
Fuzz target for HTML parser
2020-06-15 15:23:38 +02:00
Nick Wellnhofer
00ed736eec
Add a couple of libFuzzer targets
...
- XML fuzzer
Currently tests the pull parser, push parser and reader, as well as
serialization. Supports splitting fuzz data into multiple documents
for things like external DTDs or entities. The seed corpus is built
from parts of the test suite.
- Regexp fuzzer
Seed corpus was statically generated from test suite.
- URI fuzzer
Tests parsing and most other functions from uri.c.
2020-06-05 13:53:11 +02:00