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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250701145551.GS31241@twin.jikos.cz>
Date: Tue, 1 Jul 2025 16:55:51 +0200
From: David Sterba <dsterba@...e.cz>
To: Brahmajit Das <listout@...tout.xyz>
Cc: linux-hardening@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-btrfs@...r.kernel.org, clm@...com, josef@...icpanda.com,
	dsterba@...e.com, kees@...nel.org, ailiop@...e.com,
	mark@...mstone.com, David Sterba <dsterba@...e.cz>,
	Brahmajit Das <bdas@...e.de>
Subject: Re: [PATCH v4] btrfs: replace deprecated strcpy with strscpy

On Fri, Jun 20, 2025 at 10:19:57PM +0530, Brahmajit Das wrote:
> strcpy is deprecated due to lack of bounds checking. This patch replaces
> strcpy with strscpy, the recommended alternative for null terminated
> strings, to follow best practices.
> 
> There are instances where strscpy cannot be used such as where both the
> source and destination are character pointers. In that instance we can
> use sysfs_emit.
> 
> Link: https://github.com/KSPP/linux/issues/88
> Suggested-by: Anthony Iliopoulos <ailiop@...e.com>
> Suggested-by: David Sterba <dsterba@...e.cz>
> Signed-off-by: Brahmajit Das <bdas@...e.de>
> ---
> 
> Changes in v2: using sysfs_emit instead of scnprintf.
> Changes in v3: Removed string.h in xattr, since we are not using any.
> fucntions from string.h and fixed length in memcpy in volumes.c
> Changes in v4: As suggested by David, moving "NONE" as initial value of
> buf in describe_relocation() and removed copying of "NONE" to bp in
> btrfs_describe_block_groups().

Sorry for the delay, added to for-next. Thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ