Re: startup BUG at lib/string_helpers.c from scsi fusion mptsas

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

 



Cc'ing Kees.

On Thu, Apr 4, 2024 at 3:33 PM James Bottomley
<James.Bottomley@xxxxxxxxxxxxxxxxxxxxx> wrote:
> But additionally this is a common pattern in SCSI: using strncpy to
> zero terminate fields that may be unterminated in the exchange protocol
> so we can send them to sysfs or otherwise treat them as strings.  That
> means we might have this problem in other drivers you've converted ...

Correct. Although certain conditions must be met:

1) length argument is larger than source but less than or equal to destination
2) source is not NUL-terminated
3) sizes known at compile-time

I think fortified strscpy needs to be a bit more lenient towards
source buffer overreads when we know strscpy should just truncate and
NUL-terminate.

Kees, what do you think?

>
> James
>
>





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux