Skip to content

Conversation

@ethangraham2001
Copy link
Owner

@ethangraham2001 ethangraham2001 commented Aug 4, 2025

Relocation format now uses poisoning. Part of the functionality for this involved
exporting some functions from mm/kasan/kasan.h from include/linux/kasan.h
instead so that they could be used by KFuzzTest.

Also did some refactoring to make things nicer.

And since we use ranges now, add a macro KFUZZTEST_REGION_SIZE(n) which can tell
us the size of a region, for some optional in-fuzz-driver validation. This could be
real helpful, as we can discard inputs whose buffer sizes are different than the
advertised ones.

Ethan Graham added 6 commits August 5, 2025 06:41
Export kasan_poison by moving it to include/linux. Move lots of things
around into separate .c files to keep kfuzztest.h barebones.
We are going to remove distinct mode in favor of only poisoning the
padding areas between payload regions.
Also move functions out of mm/kasan/kasan.h into include/linux/kasan.h
@ethangraham2001 ethangraham2001 force-pushed the kfuzztest/relocations-revisited branch from 31cbbef to 62053d4 Compare August 6, 2025 07:56
@ethangraham2001 ethangraham2001 force-pushed the kfuzztest/relocations-revisited branch from d286890 to 45f4942 Compare August 7, 2025 13:16
Ethan Graham added 4 commits August 7, 2025 19:32
We now check for overflows a lot more carefully, and validate the input
so that regions don't point out of bounds.

Fix some nits etc...
We now assume that there is at least 8 bytes of padding before the
payload. This means that we never poison the relocation table, which
isn't a bad thing in my opinion.
@ethangraham2001 ethangraham2001 force-pushed the kfuzztest/relocations-revisited branch from 611f62f to eab275f Compare August 7, 2025 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants