[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANn89iKQ3FFiDAUCrcNQD+J27FPpiPR7bLkA3WQjLD5P7jZcRQ@mail.gmail.com>
Date: Wed, 17 Sep 2025 07:14:20 -0700
From: Eric Dumazet <edumazet@...gle.com>
To: Kuniyuki Iwashima <kuniyu@...gle.com>
Cc: "David S. Miller" <davem@...emloft.net>, Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>, Simon Horman <horms@...nel.org>,
Kuniyuki Iwashima <kuni1840@...il.com>, netdev@...r.kernel.org,
John Fastabend <john.fastabend@...il.com>, Sabrina Dubroca <sd@...asysnail.net>,
Ilya Lesokhin <ilyal@...lanox.com>
Subject: Re: [PATCH v2 net-next 5/7] tls: Use __sk_dst_get() and dst_dev_rcu()
in get_netdev_for_sock().
On Tue, Sep 16, 2025 at 2:48 PM Kuniyuki Iwashima <kuniyu@...gle.com> wrote:
>
> get_netdev_for_sock() is called during setsockopt(),
> so not under RCU.
>
> Using sk_dst_get(sk)->dev could trigger UAF.
>
> Let's use __sk_dst_get() and dst_dev_rcu().
>
> Note that the only ->ndo_sk_get_lower_dev() user is
> bond_sk_get_lower_dev(), which uses RCU.
>
> Fixes: e8f69799810c ("net/tls: Add generic NIC offload infrastructure")
> Signed-off-by: Kuniyuki Iwashima <kuniyu@...gle.com>
> ---
Reviewed-by: Eric Dumazet <edumazet@...gle.com>
Powered by blists - more mailing lists