nvme-tcp: fix a possible UAF when failing to send request

Maurizio Lombardi mlombard at bsdbackstore.eu
Wed Feb 12 02:28:34 PST 2025


On Wed Feb 12, 2025 at 10:47 AM CET, zhang.guanghui at cestc.cn wrote:
>     Hi, Thanks.
>     I will test this patch, but I am worried whether it will affect the performance.
> Should we also consider null pointer protection?

Yes, it will likely affect the performance, just check if it works.

Probably it could be optimized by just protecting
nvme_tcp_fail_request(), which AFAICT is the only function in the
nvme_tcp_try_send() code that calls nvme_complete_rq().

Maurizio




More information about the Linux-nvme mailing list