[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <D7QBMEU5WL4L.2FI34UVHXCDC5@bsdbackstore.eu>
Date: Wed, 12 Feb 2025 09:23:26 +0100
From: "Maurizio Lombardi" <mlombard@...backstore.eu>
To: "Maurizio Lombardi" <mlombard@...backstore.eu>,
"zhang.guanghui@...tc.cn" <zhang.guanghui@...tc.cn>, "chunguang.xu"
<chunguang.xu@...pee.com>
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: nvme-tcp: fix a possible UAF when failing to send request
On Wed Feb 12, 2025 at 9:11 AM CET, Maurizio Lombardi wrote:
> Hello, could you try this patch?
>
> Concurrent calls to try_recv() should already be protected by
> sock_lock.
>
> + mutex_lock(&queue->send_mutex);
> nvme_tcp_try_recv(queue);
> + r = queue->nr_cqe;
> + mutex_unlock(&queue->send_mutex);
Well, reading nr_cqe like this is still racy, but should be a minor
issue and not hard to fix.
Maurizio
Powered by blists - more mailing lists