seclab-yonsei / BoKASAN

BoKASAN: Binary-only Kernel Address Sanitizer for Effective Kernel Fuzzing
27 stars 5 forks source link

[clear_present_bit] not level 4K or 2M #1

Open WileMore opened 1 year ago

WileMore commented 1 year ago

Hi, it's great to see that you have released the source code for BoKASAN. I couldn't wait to follow your tutorial and try it out, and the results were as expected. However, when I tested it directly on host OS Ubuntu 16, I encountered the following problem: Current kernel version of the test system:

截屏2023-07-15 17 08 42

sudo insmod bokasan.ko dmesg --follow:

截屏2023-07-15 17 12 02

Do you have any suggestions for this problem? Is the problem related to the configuration in the kernel?

gomsoup commented 2 weeks ago

Hello. I apologize for not responding to the old issue.

Generally, Linux uses pre-designated page sizes depending on the architecture. In other words, the error occurs because your host architecture does not support 4k or 2M page sizes. It is not recommended to change the page size. Additionally, BoKASAN has only implemented the debug trap process for the amd64 (x86_64) architecture, so if you want to use it on another architecture, you will need to implement it separately.

It is not recommended to use BoKASAN directly on the host operating system. If any memory violations occur, BoKASAN will detect them, and the kernel will panic.

Feel free to ask any further questions.