From 5c8b703fa273026a43ca96b4c461930e2e5b3589 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Fri, 25 Nov 2016 19:41:25 +0100 Subject: report: don't print size in KASAN reports I see a bunch of reports of the form: KASAN: use-after-free Read of size 4059 in copy_from_iter but size is different in all reports. This hampers deduplication. Don't print size. --- report/report.go | 2 +- report/report_test.go | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/report/report.go b/report/report.go index 138bb5ed7..af6d37695 100644 --- a/report/report.go +++ b/report/report.go @@ -32,7 +32,7 @@ var oopses = []*oops{ []oopsFormat{ { compile("BUG: KASAN: ([a-z\\-]+) in {{FUNC}}(?:.*\\n)+?.*(Read|Write) of size ([0-9]+)"), - "KASAN: %[1]v %[3]v of size %[4]v in %[2]v", + "KASAN: %[1]v %[3]v in %[2]v", }, { compile("BUG: KASAN: ([a-z\\-]+) on address(?:.*\\n)+?.*(Read|Write) of size ([0-9]+)"), diff --git a/report/report_test.go b/report/report_test.go index 5ab275338..e45b31b65 100644 --- a/report/report_test.go +++ b/report/report_test.go @@ -77,12 +77,17 @@ BUG: KASAN: slab-out-of-bounds in memcpy+0x1d/0x40 at addr ffff88003a6bd110 Read of size 8 by task a.out/6260 BUG: KASAN: slab-out-of-bounds in memcpy+0x1d/0x40 at addr ffff88003a6bd110 Write of size 4 by task a.out/6260 -`: `KASAN: slab-out-of-bounds Read of size 8 in memcpy`, +`: `KASAN: slab-out-of-bounds Read in memcpy`, ` [ 50.583499] BUG: KASAN: use-after-free in remove_wait_queue+0xfb/0x120 at addr ffff88002db3cf50 [ 50.583499] Write of size 8 by task syzkaller_execu/10568 -`: `KASAN: use-after-free Write of size 8 in remove_wait_queue`, +`: `KASAN: use-after-free Write in remove_wait_queue`, + + ` +[ 380.688570] BUG: KASAN: use-after-free in copy_from_iter+0xf30/0x15e0 at addr ffff880033f4b02a +[ 380.688570] Read of size 4059 by task syz-executor/29957 +`: `KASAN: use-after-free Read in copy_from_iter`, ` [23818.431954] BUG: KASAN: null-ptr-deref on address (null) -- cgit mrf-deployment