All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shinichiro Kawasaki <shinichiro.kawasaki@wdc.com>
To: John Garry <john.garry@huawei.com>
Cc: "hare@suse.de" <hare@suse.de>,
	"bvanassche@acm.org" <bvanassche@acm.org>,
	"ming.lei@redhat.com" <ming.lei@redhat.com>,
	"axboe@kernel.dk" <axboe@kernel.dk>, "hch@lst.de" <hch@lst.de>,
	"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"pragalla@codeaurora.org" <pragalla@codeaurora.org>,
	"kashyap.desai@broadcom.com" <kashyap.desai@broadcom.com>,
	"yuyufen@huawei.com" <yuyufen@huawei.com>
Subject: Re: [RFC PATCH v3 0/3] blk-mq: Avoid use-after-free for accessing old requests
Date: Thu, 18 Mar 2021 10:26:15 +0000	[thread overview]
Message-ID: <20210318102614.5tatcdqmsphouydt@shindev.dhcp.fujisawa.hgst.com> (raw)
In-Reply-To: <1614957294-188540-1-git-send-email-john.garry@huawei.com>

On Mar 05, 2021 / 23:14, John Garry wrote:
> This series aims to tackle the various UAF reports, like:
> [0] https://lore.kernel.org/linux-block/8376443a-ec1b-0cef-8244-ed584b96fa96@huawei.com/
> [1] https://lore.kernel.org/linux-block/5c3ac5af-ed81-11e4-fee3-f92175f14daf@acm.org/T/#m6c1ac11540522716f645d004e2a5a13c9f218908
> [2] https://lore.kernel.org/linux-block/04e2f9e8-79fa-f1cb-ab23-4a15bf3f64cc@kernel.dk/
> [3] https://lore.kernel.org/linux-block/b859618aeac58bd9bb620d7ebdb24b90@codeaurora.org/
> 
> Details are in the commit messages.
> 
> The issue addressed in patch 1/3 is pretty easy to reproduce, 2+3/3 not so
> much, and I had to add mdelays in the iters functions to recreate in
> sane timeframes.

I also observe the KASAN UAF in blk_mq_queue_tag_busy_iter during blktests run
with kernel version 5.12-rc2 and 5.12-rc3. When the test case block/005 is run
for HDDs behind SAS HBA (Broadcom 9400), the UAF message is always reported and
it makes the test case fail. This failure was not observed with kernel v5.11. I
suppose the failure was rare until v5.11, but changes between 5.11 and 5.12-rcX
made this failure happen more frequent.

I tried the patch 1/3 by John, and saw that it avoids the UAF message and the
block/005 failure. I also tried the patch Bart suggested in this discussion
thread [1], and confirmed that it also avoids the UAF message. I appreciate
these fix work and discussion.

[1] https://marc.info/?l=linux-kernel&m=161559032606201&w=2

-- 
Best Regards,
Shin'ichiro Kawasaki

      parent reply	other threads:[~2021-03-18 10:27 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-05 15:14 [RFC PATCH v3 0/3] blk-mq: Avoid use-after-free for accessing old requests John Garry
2021-03-05 15:14 ` [RFC PATCH v3 1/3] blk-mq: Clean up references to old requests when freeing rqs John Garry
2021-03-06  2:52   ` Khazhy Kumykov
2021-03-08 11:18     ` John Garry
2021-03-06 18:13   ` Bart Van Assche
2021-03-08 10:37     ` John Garry
2021-03-07 11:33   ` kernel test robot
2021-03-07 11:33   ` [RFC PATCH] blk-mq: __blk_mq_free_rqs_ext() can be static kernel test robot
2021-03-07 12:25   ` [RFC PATCH v3 1/3] blk-mq: Clean up references to old requests when freeing rqs kernel test robot
2021-03-05 15:14 ` [RFC PATCH v3 2/3] blk-mq: Freeze and quiesce all queues for tagset in elevator_exit() John Garry
2021-03-06  4:32   ` Bart Van Assche
2021-03-08 10:50     ` John Garry
2021-03-08 19:35       ` Bart Van Assche
2021-03-10 15:57   ` Bart Van Assche
2021-03-11  0:58   ` Ming Lei
2021-03-11  8:21     ` John Garry
2021-03-12 23:05       ` Bart Van Assche
2021-03-16 16:15         ` John Garry
2021-03-16 17:00           ` Bart Van Assche
2021-03-16 17:43             ` John Garry
2021-03-16 19:59               ` Bart Van Assche
2021-03-19 18:19                 ` John Garry
2021-03-19 18:32                   ` Bart Van Assche
2021-03-05 15:14 ` [RFC PATCH v3 3/3] blk-mq: Lockout tagset iterator when exiting elevator John Garry
2021-03-06  4:43   ` Bart Van Assche
2021-03-08 11:17     ` John Garry
2021-03-08 19:59       ` Bart Van Assche
2021-03-09 17:47         ` John Garry
2021-03-09 19:21           ` Bart Van Assche
2021-03-10  8:52             ` John Garry
2021-03-10 16:00               ` Bart Van Assche
2021-03-10 17:26                 ` John Garry
2021-03-18 10:26 ` Shinichiro Kawasaki [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=20210318102614.5tatcdqmsphouydt@shindev.dhcp.fujisawa.hgst.com \
    --to=shinichiro.kawasaki@wdc.com \
    --cc=axboe@kernel.dk \
    --cc=bvanassche@acm.org \
    --cc=hare@suse.de \
    --cc=hch@lst.de \
    --cc=john.garry@huawei.com \
    --cc=kashyap.desai@broadcom.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ming.lei@redhat.com \
    --cc=pragalla@codeaurora.org \
    --cc=yuyufen@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.