mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Chaohai Chen <wdhh6@aliyun.com>,
	john.g.garry@oracle.com,  yanaijie@huawei.com,
	martin.petersen@oracle.com, dlemoal@kernel.org,
	 mingo@kernel.org, cassel@kernel.org, tglx@linutronix.de
Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] scsi: libsas: Fix potential array out of bounds in sas_check_*_expander_topo().
Date: Mon, 08 Dec 2025 16:47:09 +0900	[thread overview]
Message-ID: <6209f1aa126aff9b3c0cc6d90129aa3e34f72f81.camel@HansenPartnership.com> (raw)
In-Reply-To: <20251208073121.3773147-1-wdhh6@aliyun.com>

On Mon, 2025-12-08 at 15:31 +0800, Chaohai Chen wrote:
> No check was made to ensure that parent_phy->appended_phy_id is
> within the valid range. If the expander reports an invalid phy_id, it
> may cause the array to be out of bounds.

We tend to assume hardware operates correctly unless there's a known
faulty device that we need to code around.  Have you got a device that
exhibits this problem?  Assuming you do, I think the fix is a little
harsh: wouldn't it be better to ignore the misnumbered phy than to
ignore the entire expander?

Regards,

James


      reply	other threads:[~2025-12-08  7:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-08  7:31 Chaohai Chen
2025-12-08  7:47 ` James Bottomley [this message]

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=6209f1aa126aff9b3c0cc6d90129aa3e34f72f81.camel@HansenPartnership.com \
    --to=james.bottomley@hansenpartnership.com \
    --cc=cassel@kernel.org \
    --cc=dlemoal@kernel.org \
    --cc=john.g.garry@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=mingo@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=wdhh6@aliyun.com \
    --cc=yanaijie@huawei.com \
    /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

all inboxes | Powered by JetHome®