google/kasan — pull request #8 by steelannelida (2014-10-29 13:18:28+00:00)
Title: Kasan

Fixed the comments from previous req.

Some context to this change: to get the parsed result,you'll need the parser here https://code.google.com/p/address-sanitizer/source/browse/trunk/tools/kernel_test_parse.py, or just run "svn checkout http://address-sanitizer.googlecode.com/svn/trunk/tools".

Run the tests (insmod test_kasan.ko), then run dmesg | python tools/kernel_test_parse.py --assert_candidates 5

You'll get output similar to:

TEST kmalloc_oob_left: FAILED
Failed assert: BUG: AddressSanitizer: out of bounds access in kmalloc_oob_left.*at addr ffff88011a43b7bf
Closest matches:
[ 24.168107] BUG: AddressSanitizer: use after free in kmalloc_oob_left+0x56/0x8c [test_kasan] at addr ffff88011a43b7bf
TEST kmalloc_node_oob_right: FAILED
Failed assert: BUG: AddressSanitizer: out of bounds access in kmalloc_node_oob_right.*at addr ffff88011a45a000
Closest matches:
[ 24.212159] BUG: AddressSanitizer: use after free in kmalloc_node_oob_right+0x59/0x85 [test_kasan] at addr ffff88011a45a000
TEST kmalloc_uaf2: FAILED
Failed assert: BUG: AddressSanitizer: use after free in kmalloc_uaf2.* at addr ffff8800bb08aea8
Closest matches:
TEST kmem_cache_oob: FAILED
Failed assert: BUG: AddressSanitizer: out of bounds access in kmem_cache_oob.*at addr ffff8800bb1960c8
Closest matches:
[ 24.934110] BUG: AddressSanitizer: use after free in kmem_cache_oob+0x88/0xce [test_kasan] at addr ffff8800bb1960c8
TEST kmalloc_oob_right: PASSED
TEST kmalloc_large_oob_rigth: PASSED
TEST kmalloc_oob_krealloc_more: PASSED
TEST kmalloc_oob_krealloc_less: PASSED
TEST kmalloc_oob_16: PASSED
TEST kmalloc_oob_in_memset: PASSED
TEST kmalloc_uaf: PASSED
TEST kmalloc_uaf_memset: PASSED