core/load-fragment: reject overly long paths early
No need to go through the specifier_printf() if the path is already too long in the unexpanded form (since specifiers increase the length of the string in all practical cases). In the oss-fuzz test case, valgrind reports: total heap usage: 179,044 allocs, 179,044 frees, 72,687,755,703 bytes allocated and the original config file is ~500kb. This isn't really a security issue, since the config file has to be trusted any way, but just a matter of preventing accidental resource exhaustion. https://oss-fuzz.com/v2/issue/4651449704251392/6977 While at it, fix order of arguments in the neighbouring log_syntax() call.
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -32,10 +32,11 @@ fuzz_regression_tests = '''
|
||||
fuzz-unit-file/oss-fuzz-6884
|
||||
fuzz-unit-file/oss-fuzz-6885
|
||||
fuzz-unit-file/oss-fuzz-6886
|
||||
fuzz-unit-file/oss-fuzz-6917
|
||||
fuzz-unit-file/oss-fuzz-6892
|
||||
fuzz-unit-file/oss-fuzz-6908
|
||||
fuzz-unit-file/oss-fuzz-6897
|
||||
fuzz-unit-file/oss-fuzz-6897-evverx
|
||||
fuzz-unit-file/oss-fuzz-6908
|
||||
fuzz-unit-file/oss-fuzz-6917
|
||||
fuzz-unit-file/oss-fuzz-6977
|
||||
fuzz-unit-file/oss-fuzz-7004
|
||||
'''.split()
|
||||
|
||||
Reference in New Issue
Block a user