Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1319257

[PATCH v1 6/8] kasan: Test fix: Warn if the UAF could not be detected in kmalloc_uaf2

From Alexander Potapenko <glider@google.com>
Newsgroups linux.kernel
Subject [PATCH v1 6/8] kasan: Test fix: Warn if the UAF could not be detected in kmalloc_uaf2
Date 2016-01-27 19:30 +0100
Message-ID <qVD0T-7IE-57@gated-at.bofh.it> (permalink)
References <qVD0R-7IE-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Signed-off-by: Alexander Potapenko <glider@google.com>
---
 lib/test_kasan.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/test_kasan.c b/lib/test_kasan.c
index 66dd92f..5498a78 100644
--- a/lib/test_kasan.c
+++ b/lib/test_kasan.c
@@ -286,6 +286,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);
 }
 
-- 
2.7.0.rc3.207.g0ac5344

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v1 0/8] SLAB support for KASAN Alexander Potapenko <glider@google.com> - 2016-01-27 19:30 +0100
  [PATCH v1 2/8] mm, kasan: SLAB support Alexander Potapenko <glider@google.com> - 2016-01-27 19:30 +0100
  [PATCH v1 6/8] kasan: Test fix: Warn if the UAF could not be detected in kmalloc_uaf2 Alexander Potapenko <glider@google.com> - 2016-01-27 19:30 +0100
  [PATCH v1 8/8] mm: kasan: Initial memory quarantine implementation Alexander Potapenko <glider@google.com> - 2016-01-27 19:30 +0100
  [PATCH v1 5/8] mm, kasan: Stackdepot implementation. Enable stackdepot for SLAB Alexander Potapenko <glider@google.com> - 2016-01-27 19:30 +0100
  [PATCH v1 3/8] mm, kasan: Added GFP flags to KASAN API Alexander Potapenko <glider@google.com> - 2016-01-27 19:30 +0100
  [PATCH v1 1/8] kasan: Change the behavior of kmalloc_large_oob_right test Alexander Potapenko <glider@google.com> - 2016-01-27 19:30 +0100

csiph-web