From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: Alok Tiwari <alok.a.tiwari@oracle.com>
Cc: martin.petersen@oracle.com, hare@suse.de,
James.Bottomley@HansenPartnership.com,
linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] scsi: libfc: Fix potential buffer overflow in fc_ct_ms_fill()
Date: Wed, 24 Sep 2025 21:57:39 -0400 [thread overview]
Message-ID: <yq1tt0rqooy.fsf@ca-mkp.ca.oracle.com> (raw)
In-Reply-To: <20250915183759.768036-1-alok.a.tiwari@oracle.com> (Alok Tiwari's message of "Mon, 15 Sep 2025 11:37:57 -0700")
Alok,
> The fc_ct_ms_fill() helper currently formats the OS name and version
> into entry->value using "%s v%s". Since init_utsname()->sysname and
> ->release are unbounded strings, snprintf() may attempt to write more
> than FC_FDMI_HBA_ATTR_OSNAMEVERSION_LEN bytes, triggering a
> -Wformat-truncation warning with W=1.
Applied to 6.18/scsi-staging, thanks!
--
Martin K. Petersen
next prev parent reply other threads:[~2025-09-25 1:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-15 18:37 [PATCH] scsi: libfc: Fix potential buffer overflow in fc_ct_ms_fill() Alok Tiwari
2025-09-25 1:57 ` Martin K. Petersen [this message]
2025-09-30 2:36 ` Martin K. Petersen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=yq1tt0rqooy.fsf@ca-mkp.ca.oracle.com \
--to=martin.petersen@oracle.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=alok.a.tiwari@oracle.com \
--cc=hare@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox