From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: Dmitry Fomichev <dmitry.fomichev@wdc.com>
Cc: linux-scsi@vger.kernel.org,
"Martin K . Petersen" <martin.petersen@oracle.com>,
target-devel@vger.kernel.org, Mike Christie <mchristi@redhat.com>,
Bart Van Assche <bvanassche@acm.org>,
Damien Le Moal <damien.lemoal@wdc.com>
Subject: Re: [PATCH v2] tcmu: avoid use-after-free after command timeout
Date: Wed, 14 Aug 2019 22:00:49 -0400 [thread overview]
Message-ID: <yq1h86j2nn2.fsf@oracle.com> (raw)
In-Reply-To: <20190811182510.1706-1-dmitry.fomichev@wdc.com> (Dmitry Fomichev's message of "Sun, 11 Aug 2019 11:25:10 -0700")
Dmitry,
> In tcmu_handle_completion() function, the variable called read_len is
> always initialized with a value taken from se_cmd structure. If this
> function is called to complete an expired (timed out) out command, the
> session command pointed by se_cmd is likely to be already deallocated
> by the target core at that moment. As the result, this access triggers
> a use-after-free warning from KASAN.
Applied to 5.3/scsi-fixes, thanks!
--
Martin K. Petersen Oracle Linux Engineering
prev parent reply other threads:[~2019-08-15 2:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-11 18:25 [PATCH v2] tcmu: avoid use-after-free after command timeout Dmitry Fomichev
2019-08-12 15:30 ` Mike Christie
2019-08-12 18:00 ` Damien Le Moal
2019-08-15 2:00 ` Martin K. Petersen [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=yq1h86j2nn2.fsf@oracle.com \
--to=martin.petersen@oracle.com \
--cc=bvanassche@acm.org \
--cc=damien.lemoal@wdc.com \
--cc=dmitry.fomichev@wdc.com \
--cc=linux-scsi@vger.kernel.org \
--cc=mchristi@redhat.com \
--cc=target-devel@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