Re: [PATCH] md: replace deprecated strncpy with memcpy

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Sep 25, 2023 at 11:22 AM Kees Cook <keescook@xxxxxxxxxxxx> wrote:
>
[...]
> >
> > So really, all these instances have precisely calculated lengths and
> > purposeful NUL-termination so we can just use memcpy to remove ambiguity
> > surrounding strncpy.
> >
> > Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings [1]
> > Link: https://github.com/KSPP/linux/issues/90
> > Cc: linux-hardening@xxxxxxxxxxxxxxx
> > Signed-off-by: Justin Stitt <justinstitt@xxxxxxxxxx>
>
> I agree on the analysis of the replacements. Thanks for all the detail!
>
> Reviewed-by: Kees Cook <keescook@xxxxxxxxxxxx>

Applied to md-next.  Thanks!

Song




[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux