[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1fcd2645-e280-4505-aa75-f5a6510b5940@gmail.com>
Date: Thu, 14 Nov 2024 18:37:01 +0800
From: Tuo Li <islituo@...il.com>
To: Markus Elfring <Markus.Elfring@....de>, netdev@...r.kernel.org,
Andrew Lunn <andrew@...n.ch>, Ayush Sawal <ayush.sawal@...lsio.com>,
"David S. Miller" <davem@...emloft.net>, Dragos Tatulea
<dtatulea@...dia.com>, Eric Dumazet <edumazet@...gle.com>,
Jacob Keller <jacob.e.keller@...el.com>, Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>, Mina Almasry <almasrymina@...gle.com>,
Simon Horman <horms@...nel.org>
Cc: LKML <linux-kernel@...r.kernel.org>, Jia-Ju Bai <baijiaju1990@...il.com>
Subject: Re: [PATCH] chcr_ktls: fix a possible null-pointer dereference in
chcr_ktls_dev_add()
On 2024/11/8 23:00, Markus Elfring wrote:
> …
>> Consider the following execution scenario:
>>
>> chcr_ktls_cpl_act_open_rpl() //641
>> u_ctx = adap->uld[CXGB4_ULD_KTLS].handle; //686
>> if (u_ctx) { //687
>> complete(&tx_info->completion); //704
>>
>> The variable u_ctx is checked by an if statement at Line 687, which means
>> it can be NULL. Then, complete() is called at Line 704, which will wake
>> up wait_for_completion_xxx().
> …
>
> To which software revision would you like to refer here?
>
> How does the presented information fit to a statement like the following?
> https://elixir.bootlin.com/linux/v6.12-rc6/source/drivers/net/ethernet/chelsio/inline_crypto/ch_ktls/chcr_ktls.c#L442
>
> if (u_ctx && u_ctx->detach)
> goto out;
We have run our tool on Linux 6.11, and the line numbers correspond to the
code in that version.
> Would you eventually like to trace the control flow back any further
> for the data structure member “handle”?
>
I have traced the control flow further for the data structure member
'handle,' but I have not found where the member is assigned a NULL value. I
am not sure if I might have overlooked something.
Powered by blists - more mailing lists