[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202502111604342976121@cestc.cn>
Date: Tue, 11 Feb 2025 16:04:35 +0800
From: "zhang.guanghui@...tc.cn" <zhang.guanghui@...tc.cn>
To: chunguang.xu <chunguang.xu@...pee.com>,
"Maurizio Lombardi" <mlombard@...backstore.eu>
Cc: mgurtovoy <mgurtovoy@...dia.com>,
sagi <sagi@...mberg.me>,
kbusch <kbusch@...nel.org>,
sashal <sashal@...nel.org>,
linux-kernel <linux-kernel@...r.kernel.org>,
linux-nvme <linux-nvme@...ts.infradead.org>,
linux-block <linux-block@...r.kernel.org>
Subject: Re: Re: nvme-tcp: fix a possible UAF when failing to send request
Hi
This is a race issue, I can't reproduce it stably yet. I have not tested the latest kernel. but in fact, I've synced some nvme-tcp patches from lastest upstream,
But in fact, the issue still exists. I review nvme-tcp code and found that this issues may exist in nvme_tcp_poll processing.
zhang.guanghui@...tc.cn
From: Xu Chunguang
Date: 2025-02-11 15:20
To: Maurizio Lombardi
CC: Max Gurtovoy; zhang.guanghui; sagi; kbusch; sashal; linux-kernel; linux-nvme; linux-block
Subject: Re: nvme-tcp: fix a possible UAF when failing to send request
Hi:
Does you have tested the latest kernel, can it reproduce the same issue?
Maurizio Lombardi <mlombard@...backstore.eu> 于 2025年2月11日周二 00:40写道:
On Mon Feb 10, 2025 at 11:24 AM CET, Max Gurtovoy wrote:
>
> It seems to me that the HOST_PATH_ERROR handling can be improved in
> nvme-tcp.
>
> In nvme-rdma we use nvme_host_path_error(rq) and nvme_cleanup_cmd(rq) in
> case we fail to submit a command..
>
> can you try to replacing nvme_tcp_end_request(blk_mq_rq_from_pdu(req),
> NVME_SC_HOST_PATH_ERROR); call with the similar logic we use in
> nvme-rdma for host path error handling ?
Yes, I could try to prepare a patch.
In any case, I think the main issue here is that nvme_tcp_poll()
should be prevented from racing against io_work... and I also think
there is a possible race condition if nvme_tcp_poll() races against
the controller resetting code.
Maurizio
Powered by blists - more mailing lists