mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-29 04:54:27 +01:00
memcpy_overflow failed fortify source attempt
This commit is contained in:
@@ -4607,7 +4607,7 @@ Make it harder to get hacked and easier to notice that you were, at the cost of
|
||||
Detects buffer overflows for us:
|
||||
|
||||
....
|
||||
./build -C 'CONFIG_FORTIFY_SOURCE=y' -L fortify
|
||||
./build -C 'CONFIG_FORTIFY_SOURCE=y' -L fortify -k
|
||||
./run -F 'insmod /strlen_overflow.ko' -L fortify
|
||||
....
|
||||
|
||||
@@ -4623,7 +4623,11 @@ followed by a trace.
|
||||
|
||||
You may not get this error because this depends on `strlen` overflowing at least until the next page: if a random `\0` appears soon enough, it won't blow up as desired.
|
||||
|
||||
I did observe this at link:http://github.com/cirosantilli/linux-kernel-module-cheat/commit/1b451a70d46a5c4619992ad4dd2e4b8f5a84c252[1b451a70d46a5c4619992ad4dd2e4b8f5a84c252] but not at link:http://github.com/cirosantilli/linux-kernel-module-cheat/commit/9b4c1984fc2cb04de0b4d62749cc1f8eabf26c6f[9b4c1984fc2cb04de0b4d62749cc1f8eabf26c6f] TODO: find a more reproducible failure.
|
||||
TODO not always reproducible. Find a more reproducible failure. I could not observe it on:
|
||||
|
||||
....
|
||||
insmod /memcpy_overflow.ko
|
||||
....
|
||||
|
||||
Source: link:kernel_module/strlen_overflow.c[]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user