mbox series

[v5,0/2] string: Add load_unaligned_zeropad() code path to sized_strscpy()

Message ID 20250403000703.2584581-1-pcc@google.com (mailing list archive)
Headers show
Series string: Add load_unaligned_zeropad() code path to sized_strscpy() | expand

Message

Peter Collingbourne April 3, 2025, 12:06 a.m. UTC
This series fixes an issue where strscpy() would sometimes trigger
a false positive KASAN report with MTE.

v5:
- add test for unreadable first byte of strscpy() source

v4:
- clarify commit message
- improve comment

v3:
- simplify test case

Peter Collingbourne (1):
  string: Add load_unaligned_zeropad() code path to sized_strscpy()

Vincenzo Frascino (1):
  kasan: Add strscpy() test to trigger tag fault on arm64

 lib/string.c            | 13 ++++++++++---
 mm/kasan/kasan_test_c.c | 20 ++++++++++++++++++++
 2 files changed, 30 insertions(+), 3 deletions(-)

Comments

Kees Cook April 3, 2025, 5:20 p.m. UTC | #1
On Wed, 02 Apr 2025 17:06:58 -0700, Peter Collingbourne wrote:
> This series fixes an issue where strscpy() would sometimes trigger
> a false positive KASAN report with MTE.
> 
> v5:
> - add test for unreadable first byte of strscpy() source
> 
> v4:
> - clarify commit message
> - improve comment
> 
> [...]

Applied to for-next/hardening, thanks!

[1/2] string: Add load_unaligned_zeropad() code path to sized_strscpy()
      https://git.kernel.org/kees/c/acc66d46810d
[2/2] kasan: Add strscpy() test to trigger tag fault on arm64
      https://git.kernel.org/kees/c/48ac25ef250d

Take care,