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: <CA+8PC_euoeTyvhm8ANWD0KawzZxYsEdRqys8COoez0dGvFxn6A@mail.gmail.com>
Date: Tue, 17 Oct 2023 14:27:21 -0700
From: Franky Lin <franky.lin@...adcom.com>
To: Justin Stitt <justinstitt@...gle.com>
Cc: Arend van Spriel <aspriel@...il.com>, Hante Meuleman <hante.meuleman@...adcom.com>, 
	Kalle Valo <kvalo@...nel.org>, linux-wireless@...r.kernel.org, 
	brcm80211-dev-list.pdl@...adcom.com, SHA-cyfmac-dev-list@...ineon.com, 
	linux-kernel@...r.kernel.org, linux-hardening@...r.kernel.org
Subject: Re: [PATCH v3 0/2] wifi: brcm80211: replace deprecated strncpy

On Tue, Oct 17, 2023 at 1:11 PM 'Justin Stitt' via
BRCM80211-DEV-LIST,PDL <brcm80211-dev-list.pdl@...adcom.com> wrote:
>
> Hi,
>
> This series used to be just one patch in [v2] but I've split it into two
> separate patches.
>
> The motivation behind this series is that strncpy() is deprecated for
> use on NUL-terminated destination strings [1] and as such we should
> prefer more robust and less ambiguous string interfaces.
>
> In cases where we expect the destination buffer to be NUL-terminated
> let's opt for strscpy() as this guarantees NUL-termination. Other cases
> are just simple byte copies with pre-determined bounds; for these let's
> use plain-ol' memcpy().
>
> Each change is detailed in its accompanying patch message.
>
> Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings [1]
> Link: https://manpages.debian.org/testing/linux-manual-4.8/strscpy.9.en.html [2]
> Link: https://github.com/KSPP/linux/issues/90
> Signed-off-by: Justin Stitt <justinstitt@...gle.com>

Reviewed-by: Franky Lin <franky.lin@...adcom.com>

> ---
> Changes in v3:
> - split up into two separate patches (thanks Franky)
> - use better subject line (thanks Franky + Kalle)
> - Link to v2: https://lore.kernel.org/r/20231016-strncpy-drivers-net-wireless-broadcom-brcm80211-brcmfmac-cfg80211-c-v2-1-6c7567e1d3b8@google.com
>
> Changes in v2:
> - add other strncpy replacements
> - Link to v1: https://lore.kernel.org/r/20231016-strncpy-drivers-net-wireless-broadcom-brcm80211-brcmfmac-cfg80211-c-v1-1-4234807ca07e@google.com
>
> ---
> Justin Stitt (2):
>       wifi: brcm80211: replace deprecated strncpy with strscpy
>       wifi: brcmsmac: replace deprecated strncpy with memcpy
>
>  drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 2 +-
>  drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c      | 2 +-
>  drivers/net/wireless/broadcom/brcm80211/brcmsmac/channel.c  | 6 +++---
>  drivers/net/wireless/broadcom/brcm80211/brcmsmac/dma.c      | 3 +--
>  drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c     | 4 ++--
>  5 files changed, 8 insertions(+), 9 deletions(-)
> ---
> base-commit: cbf3a2cb156a2c911d8f38d8247814b4c07f49a2
> change-id: 20231016-strncpy-drivers-net-wireless-broadcom-brcm80211-brcmfmac-cfg80211-c-a20108421685
>
> Best regards,
> --
> Justin Stitt <justinstitt@...gle.com>
>

Download attachment "smime.p7s" of type "application/pkcs7-signature" (4203 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ