Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
kasan: Test fix: Warn if the UAF could not be detected in kmalloc_uaf2
Signed-off-by: Alexander Potapenko <[email protected]>
  • Loading branch information
ramosian-glider committed Jan 14, 2016
commit c379512f84aad8a155f8cd1db9624876a8c3fe04
2 changes: 2 additions & 0 deletions lib/test_kasan.c
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,8 @@ static noinline void __init kmalloc_uaf2(void)
}

ptr1[40] = 'x';
if (ptr1 == ptr2)
pr_err("Could not detect use-after-free: ptr1 == ptr2\n");
kfree(ptr2);
}

Expand Down