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>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CANpmjNOLKQsVTvqV+OdMrNOaHoWnUq1TU-nTRBKGCzY87E7xUw@mail.gmail.com>
Date: Tue, 19 Aug 2025 21:00:58 +0200
From: Marco Elver <elver@...gle.com>
To: Thorsten Blum <thorsten.blum@...ux.dev>
Cc: Dmitry Vyukov <dvyukov@...gle.com>, linux-hardening@...r.kernel.org, 
	kasan-dev@...glegroups.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] kcsan: test: Replace deprecated strcpy() with strscpy()

On Fri, 15 Aug 2025 at 23:38, Thorsten Blum <thorsten.blum@...ux.dev> wrote:
>
> strcpy() is deprecated; use strscpy() instead.
>
> Link: https://github.com/KSPP/linux/issues/88
> Signed-off-by: Thorsten Blum <thorsten.blum@...ux.dev>

Reviewed-by: Marco Elver <elver@...gle.com>

Taking this into the -kcsan tree, but might be a while until it hits mainline.

> ---
>  kernel/kcsan/kcsan_test.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/kernel/kcsan/kcsan_test.c b/kernel/kcsan/kcsan_test.c
> index 49ab81faaed9..ea1cb4c8a894 100644
> --- a/kernel/kcsan/kcsan_test.c
> +++ b/kernel/kcsan/kcsan_test.c
> @@ -125,7 +125,7 @@ static void probe_console(void *ignore, const char *buf, size_t len)
>                                 goto out;
>
>                         /* No second line of interest. */
> -                       strcpy(observed.lines[nlines++], "<none>");
> +                       strscpy(observed.lines[nlines++], "<none>");
>                 }
>         }
>
> @@ -231,7 +231,7 @@ static bool __report_matches(const struct expect_report *r)
>
>                         if (!r->access[1].fn) {
>                                 /* Dummy string if no second access is available. */
> -                               strcpy(cur, "<none>");
> +                               strscpy(expect[2], "<none>");
>                                 break;
>                         }
>                 }
> --
> 2.50.1
>
> --
> You received this message because you are subscribed to the Google Groups "kasan-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to kasan-dev+unsubscribe@...glegroups.com.
> To view this discussion visit https://groups.google.com/d/msgid/kasan-dev/20250815213742.321911-3-thorsten.blum%40linux.dev.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ