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

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

 



On Thu, 2024-04-04 at 14:38 -0700, Justin Stitt wrote:
[...]
> I am not sure how my patch [1] is triggering this fortify panic. I
> didn't modify this printk or the string arguments (ioc->name), also
> the change from strncpy to strscpy did not introduce any strnlen()'s
> which seems to be the thing fortify is upset about:
> "2024-04-01T19:18:28.000000+00:00 zGMT kernel - - - detected buffer
> overflow in strnlen"
> or
> "2024-04-01T22:23:45.000000+00:00 zGMT kernel - - - strnlen: detected
> buffer overflow: 9 byte read of buffer size 8"

it's sitting in the definition of sized_strscpy in fortify-string.h

Since the fields in question aren't zero terminated there's a bad
assumption that you can do strnlen on the source field.

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