[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z-5ZTNbc-sl51Rrt@arm.com>
Date: Thu, 3 Apr 2025 10:47:56 +0100
From: Catalin Marinas <catalin.marinas@....com>
To: Peter Collingbourne <pcc@...gle.com>
Cc: Alexander Viro <viro@...iv.linux.org.uk>,
Christian Brauner <brauner@...nel.org>, Jan Kara <jack@...e.cz>,
Andrew Morton <akpm@...ux-foundation.org>,
Kees Cook <kees@...nel.org>, Andy Shevchenko <andy@...nel.org>,
Andrey Konovalov <andreyknvl@...il.com>,
Mark Rutland <mark.rutland@....com>,
Vincenzo Frascino <vincenzo.frascino@....com>,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-hardening@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, Will Deacon <will@...nel.org>
Subject: Re: [PATCH v5 2/2] kasan: Add strscpy() test to trigger tag fault on
arm64
On Wed, Apr 02, 2025 at 05:07:00PM -0700, Peter Collingbourne wrote:
> From: Vincenzo Frascino <vincenzo.frascino@....com>
>
> When we invoke strscpy() with a maximum size of N bytes, it assumes
> that:
> - It can always read N bytes from the source.
> - It always write N bytes (zero-padded) to the destination.
>
> On aarch64 with Memory Tagging Extension enabled if we pass an N that is
> bigger then the source buffer, it would previously trigger an MTE fault.
>
> Implement a KASAN KUnit test that triggers the issue with the previous
> implementation of read_word_at_a_time() on aarch64 with MTE enabled.
>
> Cc: Will Deacon <will@...nel.org>
> Signed-off-by: Vincenzo Frascino <vincenzo.frascino@....com>
> Signed-off-by: Catalin Marinas <catalin.marinas@....com>
> Co-developed-by: Peter Collingbourne <pcc@...gle.com>
> Signed-off-by: Peter Collingbourne <pcc@...gle.com>
> Reviewed-by: Andrey Konovalov <andreyknvl@...il.com>
> Link: https://linux-review.googlesource.com/id/If88e396b9e7c058c1a4b5a252274120e77b1898a
Reviewed-by: Catalin Marinas <catalin.marinas@....com>
Powered by blists - more mailing lists