Re: [PATCH 0/5] scsi: Avoid possible run-time warning with long manufacturer strings

2024-04-24 Thread Martin K. Petersen
Kees, > This series fixes all 4 of the instances I could find in the SCSI > subsystem. Looks OK to me. Minor nit: I do find it a bit odd to think of a string as "memory". Maybe that's just because I am so used to always having to distinguish between fixed length strings and NUL-terminated

Re: [PATCH 0/5] scsi: Avoid possible run-time warning with long manufacturer strings

2024-04-18 Thread Kees Cook
On Wed, Apr 17, 2024 at 08:35:15PM -0400, Martin K. Petersen wrote: > > Hi Kees! > > >> This series fixes all 4 of the instances I could find in the SCSI > >> subsystem. > > > > Friendly ping. Can the SCSI tree pick this up, or should I take it > > through the hardening tree? > > It's on my

Re: [PATCH 0/5] scsi: Avoid possible run-time warning with long manufacturer strings

2024-04-17 Thread Martin K. Petersen
Hi Kees! >> This series fixes all 4 of the instances I could find in the SCSI >> subsystem. > > Friendly ping. Can the SCSI tree pick this up, or should I take it > through the hardening tree? It's on my list of series to review. Have a couple of fires going right now. -- Martin K. Petersen

Re: [PATCH 0/5] scsi: Avoid possible run-time warning with long manufacturer strings

2024-04-17 Thread Kees Cook
On Tue, Apr 09, 2024 at 07:31:49PM -0700, Kees Cook wrote: > Hi, > > Another code pattern using the gloriously ambiguous strncpy() function was > turning maybe not-NUL-terminated character arrays into NUL-terminated > strings. In these cases, when strncpy() is replaced with strscpy() > it creates

[PATCH 0/5] scsi: Avoid possible run-time warning with long manufacturer strings

2024-04-09 Thread Kees Cook
Hi, Another code pattern using the gloriously ambiguous strncpy() function was turning maybe not-NUL-terminated character arrays into NUL-terminated strings. In these cases, when strncpy() is replaced with strscpy() it creates a situation where if the non-terminated string takes up the entire