All of lore.kernel.org
 help / color / mirror / Atom feed
* [merged mm-stable] kasan-check-object_size-in-kasan_complete_mode_report_info.patch removed from -mm tree
@ 2023-12-11  0:55 Andrew Morton
  0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2023-12-11  0:55 UTC (permalink / raw)
  To: mm-commits, vbabka, osalvador, glider, eugenis, elver, dvyukov,
	andreyknvl, akpm


The quilt patch titled
     Subject: kasan: check object_size in kasan_complete_mode_report_info
has been removed from the -mm tree.  Its filename was
     kasan-check-object_size-in-kasan_complete_mode_report_info.patch

This patch was dropped because it was merged into the mm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Andrey Konovalov <andreyknvl@google.com>
Subject: kasan: check object_size in kasan_complete_mode_report_info
Date: Mon, 20 Nov 2023 18:47:17 +0100

Check the object size when looking up entries in the stack ring.

If the size of the object for which a report is being printed does not
match the size of the object for which a stack trace has been saved in the
stack ring, the saved stack trace is irrelevant.

Link: https://lkml.kernel.org/r/68c6948175aadd7e7e7deea61725103d64a4528f.1700502145.git.andreyknvl@google.com
Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
Reviewed-by: Alexander Potapenko <glider@google.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Evgenii Stepanov <eugenis@google.com>
Cc: Marco Elver <elver@google.com>
Cc: Oscar Salvador <osalvador@suse.de>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/kasan/report_tags.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- a/mm/kasan/report_tags.c~kasan-check-object_size-in-kasan_complete_mode_report_info
+++ a/mm/kasan/report_tags.c
@@ -7,6 +7,7 @@
 #include <linux/atomic.h>
 
 #include "kasan.h"
+#include "../slab.h"
 
 extern struct kasan_stack_ring stack_ring;
 
@@ -58,7 +59,8 @@ void kasan_complete_mode_report_info(str
 		entry = &stack_ring.entries[i % stack_ring.size];
 
 		if (kasan_reset_tag(entry->ptr) != info->object ||
-		    get_tag(entry->ptr) != get_tag(info->access_addr))
+		    get_tag(entry->ptr) != get_tag(info->access_addr) ||
+		    info->cache->object_size != entry->size)
 			continue;
 
 		if (entry->is_free) {
_

Patches currently in -mm which might be from andreyknvl@google.com are



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-12-11  0:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-11  0:55 [merged mm-stable] kasan-check-object_size-in-kasan_complete_mode_report_info.patch removed from -mm tree Andrew Morton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.