netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hangyu Hua <hbh25y@gmail.com>
To: Guenter Roeck <linux@roeck-us.net>
Cc: borisp@nvidia.com, john.fastabend@gmail.com, kuba@kernel.org,
	davem@davemloft.net, edumazet@google.com, pabeni@redhat.com,
	davejwatson@fb.com, aviadye@mellanox.com, ilyal@mellanox.com,
	fw@strlen.de, sd@queasysnail.net, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] net: tls: fix possible race condition between do_tls_getsockopt_conf() and do_tls_setsockopt_conf()
Date: Mon, 27 Mar 2023 17:05:37 +0800	[thread overview]
Message-ID: <f3eb7ec0-99b0-0ed3-0ffc-5ea20436bd08@gmail.com> (raw)
In-Reply-To: <fdfa0099-481c-48d6-8ab8-0c84b260e451@roeck-us.net>

On 26/3/2023 22:12, Guenter Roeck wrote:
> Hi,
> 
> On Tue, Feb 28, 2023 at 10:33:44AM +0800, Hangyu Hua wrote:
>> ctx->crypto_send.info is not protected by lock_sock in
>> do_tls_getsockopt_conf(). A race condition between do_tls_getsockopt_conf()
>> and do_tls_setsockopt_conf() can cause a NULL point dereference or
>> use-after-free read when memcpy.
>>
>> Please check the following link for pre-information:
>>   https://lore.kernel.org/all/Y/ht6gQL+u6fj3dG@hog/
>>
>> Fixes: 3c4d7559159b ("tls: kernel TLS support")
>> Signed-off-by: Hangyu Hua <hbh25y@gmail.com>
> 
> This patch has been applied to v6.1.y. Should it be applied to older kernel
> branches as well ? I know it doesn't apply cleanly, but the conflicts
> should be easy to resolve. I'll be happy to send backports to stable@ if
> needed.
> 
> Thanks,
> Guenter

Look like Meena Shanmugam is doing this. Please check this:

https://lore.kernel.org/all/20230323005440.518172-2-meenashanmugam@google.com/

Thanks for your attention.

Thanks,
Hangyu

  reply	other threads:[~2023-03-27  9:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-28  2:33 [PATCH v2] net: tls: fix possible race condition between do_tls_getsockopt_conf() and do_tls_setsockopt_conf() Hangyu Hua
2023-03-02  4:40 ` patchwork-bot+netdevbpf
2023-03-26 14:12 ` Guenter Roeck
2023-03-27  9:05   ` Hangyu Hua [this message]
2023-03-27 11:07     ` Guenter Roeck

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=f3eb7ec0-99b0-0ed3-0ffc-5ea20436bd08@gmail.com \
    --to=hbh25y@gmail.com \
    --cc=aviadye@mellanox.com \
    --cc=borisp@nvidia.com \
    --cc=davejwatson@fb.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=fw@strlen.de \
    --cc=ilyal@mellanox.com \
    --cc=john.fastabend@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sd@queasysnail.net \
    /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;
as well as URLs for NNTP newsgroup(s).