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: <132c99af-bbac-4dad-84b7-7ed016517d0c@app.fastmail.com>
Date: Mon, 08 Apr 2024 20:15:30 +0200
From: "Arnd Bergmann" <arnd@...db.de>
To: "Justin Stitt" <justinstitt@...gle.com>, "Arnd Bergmann" <arnd@...nel.org>
Cc: linux-kernel@...r.kernel.org,
 "Greg Kroah-Hartman" <gregkh@...uxfoundation.org>,
 "Nathan Chancellor" <nathan@...nel.org>,
 "Nick Desaulniers" <ndesaulniers@...gle.com>,
 "Bill Wendling" <morbo@...gle.com>,
 "Franziska Naepelt" <franziska.naepelt@...glemail.com>,
 "Johannes Berg" <johannes.berg@...el.com>,
 "Yang Yingliang" <yangyingliang@...wei.com>,
 "Erick Archer" <erick.archer@....com>, linux-staging@...ts.linux.dev,
 llvm@...ts.linux.dev
Subject: Re: [PATCH 09/11] staging: rtl8723bs: convert strncpy to strscpy

On Fri, Mar 29, 2024, at 00:01, Justin Stitt wrote:
>> Change both strncpy() instances to strscpy(), which avoids the warning as well
>> as the possibly missing termination. No additional padding is needed here.
>
> Could you also clean up the strncpy present in
> drivers/staging/rtl8723bs/os_dep/os_intfs.c so all these are cleaned
> up at once?

I originally tried not to mix the general conversion with the
warning fixes, but it looks like it has the same issue in theory.

Not sure why there is no warning for this one, I guess it's because
it copies from a fixed-size source of the same length?

Anyway, it's clearly related here so I've added this for v2.

> Maybe we could use the new 2-argument version of strscpy() introduced
> in Commit e6584c3964f2f ("string: Allow 2-argument strscpy()") for all
> 3 of these too.
>
> It looks like:
>     strscpy(dest, src);
>

Done now, after double-checking that the sizes actually match.

Thanks for the review,

      Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ