mirror of
https://github.com/Dasharo/systemd.git
synced 2026-03-06 15:02:31 -08:00
journal: refuse data which contain invalid fields
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=25353.
This commit is contained in:
@@ -1572,6 +1572,9 @@ static int journal_file_append_field(
|
||||
assert(f);
|
||||
assert(field && size > 0);
|
||||
|
||||
if (!journal_field_valid(field, size, true))
|
||||
return -EBADMSG;
|
||||
|
||||
hash = journal_file_hash_data(f, field, size);
|
||||
|
||||
r = journal_file_find_field_object_with_hash(f, field, size, hash, &o, &p);
|
||||
|
||||
BIN
test/fuzz/fuzz-journal-remote/oss-fuzz-25353
Normal file
BIN
test/fuzz/fuzz-journal-remote/oss-fuzz-25353
Normal file
Binary file not shown.
Reference in New Issue
Block a user