diff options
| author | Ethan Graham <ethangraham@google.com> | 2025-09-18 14:13:45 +0000 |
|---|---|---|
| committer | Aleksandr Nogikh <nogikh@google.com> | 2025-09-22 09:11:54 +0000 |
| commit | 0ac7291ca51f87df8022da0f66178546e855701a (patch) | |
| tree | 9f0f40794061c15b5cfae099bfbd9cc65c649d76 /sys | |
| parent | 00c475bd12fe0219cd0564fc64272452b40d372c (diff) | |
prog: fix syz_kfuzztest_run allocation strategy
Previously, the generated KFuzzTest programs were reusing the address of
the top-level input struct. A problem could arise when the encoded blob
is large and overflows into another allocated region - this certainly
happens in the case where the input struct points to some large char
buffer, for example.
While this wasn't directly a problem, it could lead to racy behavior
when running KFuzzTest targets concurrently.
To fix this, we now introduce an additional buffer parameter into
syz_kfuzztest_run that is as big as the maximum accepted input size in
the KFuzzTest kernel code. When this buffer is allocated, we ensure that
we have some allocated space in the program that can hold the entire
encoded input.
This works in practice, but has not been tested with concurrent
KFuzzTest executions yet.
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/linux/kfuzztest.txt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/linux/kfuzztest.txt b/sys/linux/kfuzztest.txt index 3d4aba385..094d50ac0 100644 --- a/sys/linux/kfuzztest.txt +++ b/sys/linux/kfuzztest.txt @@ -1,4 +1,4 @@ # Copyright 2025 syzkaller project authors. All rights reserved. # Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. -syz_kfuzztest_run(name ptr[in, string], data ptr[in, array[int8]], len bytesize[data]) (kfuzz_test, no_generate) +syz_kfuzztest_run(name ptr[in, string], data ptr[in, array[int8]], len bytesize[data], buf ptr[in, array[int8, 65536]]) (kfuzz_test, no_generate) |
