lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20210113090340.23129-1-lecopzer.chen@mediatek.com>
Date:   Wed, 13 Jan 2021 17:03:40 +0800
From:   Lecopzer Chen <lecopzer.chen@...iatek.com>
To:     <linux-kernel@...r.kernel.org>, <linux-mm@...ck.org>,
        <kasan-dev@...glegroups.com>
CC:     Lecopzer Chen <lecopzer.chen@...iatek.com>,
        <dan.j.williams@...el.com>, <aryabinin@...tuozzo.com>,
        <glider@...gle.com>, <dvyukov@...gle.com>,
        <akpm@...ux-foundation.org>, <linux-mediatek@...ts.infradead.org>,
        <yj.chiang@...iatek.com>, Lecopzer Chen <lecopzer@...il.com>,
        Andrey Konovalov <andreyknvl@...gle.com>
Subject: [RESEND PATCH] kasan: fix incorrect arguments passing in kasan_add_zero_shadow

kasan_remove_zero_shadow() shall use original virtual address, start
and size, instead of shadow address.

Fixes: 0207df4fa1a86 ("kernel/memremap, kasan: make ZONE_DEVICE with work with KASAN")
Signed-off-by: Lecopzer Chen <lecopzer.chen@...iatek.com>
Reviewed-by: Andrey Konovalov <andreyknvl@...gle.com>
Cc: Andrey Ryabinin <aryabinin@...tuozzo.com>
Cc: Dan Williams <dan.j.williams@...el.com>
Cc: Dmitry Vyukov <dvyukov@...gle.com>
Cc: Alexander Potapenko <glider@...gle.com>
Signed-off-by: Andrew Morton <akpm@...ux-foundation.org>
---
 mm/kasan/init.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/mm/kasan/init.c b/mm/kasan/init.c
index bc0ad208b3a7..67051cfae41c 100644
--- a/mm/kasan/init.c
+++ b/mm/kasan/init.c
@@ -481,7 +481,6 @@ int kasan_add_zero_shadow(void *start, unsigned long size)
 
 	ret = kasan_populate_early_shadow(shadow_start, shadow_end);
 	if (ret)
-		kasan_remove_zero_shadow(shadow_start,
-					size >> KASAN_SHADOW_SCALE_SHIFT);
+		kasan_remove_zero_shadow(start, size);
 	return ret;
 }
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ