From: "Yu Kuai" <yukuai@fnnas.com>
To: "Zheng Qixing" <zhengqixing@huaweicloud.com>
Cc: <hch@infradead.org>, <cgroups@vger.kernel.org>,
<linux-block@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<yi.zhang@huawei.com>, <yangerkun@huawei.com>,
<houtao1@huawei.com>, <tj@kernel.org>, <josef@toxicpanda.com>,
<axboe@kernel.dk>, <zhengqixing@huawei.com>, <yukuai@fnnas.com>
Subject: Re: [PATCH 2/3] blk-cgroup: fix uaf in blkcg_activate_policy() racing with blkg_free_workfn()
Date: Fri, 9 Jan 2026 14:43:39 +0800 [thread overview]
Message-ID: <22046287-0a36-45ac-bc17-b41636076552@fnnas.com> (raw)
In-Reply-To: <5fdbd368-6d00-4453-8f03-23d17c8c1338@huaweicloud.com>
Hi,
在 2026/1/9 14:22, Zheng Qixing 写道:
> I tried adding blkcg_mutex protection in blkcg_activate_policy() and
> blkg_destroy_all() as suggested.
>
> Unfortunately, the UAF still occurs even with proper mutex protection.
>
> The mutex successfully protects the list structure during traversal
> won't be added/removed from
>
> q->blkg_list while we hold the lock. However, this doesn't prevent the
> same blkg from being released
>
> twice.
I don't understand, what I suggested should actually include your changes in this patch. Can you
show your changes and make sure blkcg_policy_teardown_pds() inside blkcg_activate_policy() is
also protected.
--
Thansk,
Kuai
next prev parent reply other threads:[~2026-01-09 6:43 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-08 1:44 [PATCH 0/3] blk-cgroup: cleanup and bugfixs in blk-cgroup Zheng Qixing
2026-01-08 1:44 ` [PATCH 1/3] blk-cgroup: factor policy pd teardown loop into helper Zheng Qixing
2026-01-08 13:51 ` Christoph Hellwig
2026-01-08 16:12 ` Yu Kuai
2026-01-09 14:44 ` Michal Koutný
2026-01-12 1:04 ` Zheng Qixing
2026-01-08 1:44 ` [PATCH 2/3] blk-cgroup: fix uaf in blkcg_activate_policy() racing with blkg_free_workfn() Zheng Qixing
2026-01-08 13:51 ` Christoph Hellwig
2026-01-08 16:11 ` Yu Kuai
2026-01-09 6:22 ` Zheng Qixing
2026-01-09 6:43 ` Yu Kuai [this message]
2026-01-09 8:37 ` Zheng Qixing
2026-01-08 1:44 ` [PATCH 3/3] blk-cgroup: skip dying blkg in blkcg_activate_policy() Zheng Qixing
2026-01-08 13:52 ` Christoph Hellwig
2026-01-08 16:22 ` Yu Kuai
2026-01-09 8:46 ` Zheng Qixing
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=22046287-0a36-45ac-bc17-b41636076552@fnnas.com \
--to=yukuai@fnnas.com \
--cc=axboe@kernel.dk \
--cc=cgroups@vger.kernel.org \
--cc=hch@infradead.org \
--cc=houtao1@huawei.com \
--cc=josef@toxicpanda.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tj@kernel.org \
--cc=yangerkun@huawei.com \
--cc=yi.zhang@huawei.com \
--cc=zhengqixing@huawei.com \
--cc=zhengqixing@huaweicloud.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®