From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Yehyeong Lee <yhlee@isslab.korea.ac.kr>,
"Martin K . Petersen" <mkp@kernel.org>
Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH v3 2/5] scsi: aic94xx: validate the EDB index in asd_get_response_tasklet()
Date: Tue, 20 Oct 2026 10:51:55 -0400 [thread overview]
Message-ID: <1f9e1b5852aeb4827c31efcf537ff7201ac32cfb.camel@HansenPartnership.com> (raw)
In-Reply-To: <20261016001453.232046-1-yhlee@isslab.korea.ac.kr>
On Fri, 2026-10-16 at 09:14 +0900, Yehyeong Lee wrote:
> > have you actually tested this on real hardware?
>
> No -- the hardware is twenty years old and I couldn't get a board. I
> exercised the path by fault injection: built the function into a
> KUnit harness, fed it a status block with those three bits zero, and
> KASAN reported the read one entry before seq->edb_arr[] without the
> guard and nothing with it. That isn't evidence the sequencer does
> this, and I'm not presenting it as such.
>
> > is there any evidence of the sequencer ever setting these three
> > bits to a zero value?
>
> I can't show that it does. I looked for something authoritative -- an
> AIC-9410 done-list/status-block layout -- and there's no public
> Adaptec spec; the sequencer is an opaque request_firmware() blob, and
> the only in-tree description of this field is the commented-out size
> line just above the decode. What the tree does settle is the decode:
> the index is one-based, and the same seq->edb_arr[edb_id + edb_index]
> access is also reached from the empty-buffer path
> (escb_tasklet_complete -> asd_bytes_dmaed_tasklet), where edb < 0 is
> rejected before the access
> --
> aic94xx_scb.c:410, the 0xc0 "no buffer" case. The response path
> reaches the identical access with no such check. So it really turns
> on whether the sequencer can set those bits to zero on a response: if
> you know it can't, this is dead code like the second comparison and
> I'll drop it; if the field is as unbounded as it looks, this is the
> guard the driver already applies to the same array on its other
> producer.
There is a long tail of old server class hardware that has this chip as
its on-board controller, so we try not to touch the driver to avoid
causing bugs for them which will only show up months to years later
when they install stable backports. The problem you outline here is
purely theoretical: if the sequencer put a zero in this field; however,
there's never been any actual observation of any sequencer doing that,
so there's no evidence a bug actually exists here. Added to which the
fact that the change is untested on real hardware seems to create a set
of risks in applying it without much offset in the way of benefit.
Regards,
James
next prev parent reply other threads:[~2026-10-20 14:51 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-15 9:17 [PATCH v3 0/5] scsi: aic94xx: validate the indices the sequencer supplies Yehyeong Lee
2026-10-15 9:17 ` [PATCH v3 1/5] scsi: aic94xx: bail out of escb_tasklet_complete() on a bad EDB index Yehyeong Lee
2026-10-15 9:17 ` [PATCH v3 2/5] scsi: aic94xx: validate the EDB index in asd_get_response_tasklet() Yehyeong Lee
2026-10-15 13:05 ` James Bottomley
2026-10-16 0:14 ` Yehyeong Lee
2026-10-20 14:51 ` James Bottomley [this message]
2026-10-15 9:17 ` [PATCH v3 3/5] scsi: aic94xx: validate the EDB index in asd_get_tmf_resp_tasklet() Yehyeong Lee
2026-10-15 9:17 ` [PATCH v3 4/5] scsi: aic94xx: bound the transaction context index from the sequencer Yehyeong Lee
2026-10-15 9:17 ` [PATCH v3 5/5] scsi: aic94xx: check that an ESCB lookup returned an ESCB Yehyeong Lee
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=1f9e1b5852aeb4827c31efcf537ff7201ac32cfb.camel@HansenPartnership.com \
--to=james.bottomley@hansenpartnership.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=mkp@kernel.org \
--cc=stable@vger.kernel.org \
--cc=yhlee@isslab.korea.ac.kr \
/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®