From: Kuniyuki Iwashima <kuniyu@amazon.com>
To: "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
David Ahern <dsahern@kernel.org>
Cc: Kuniyuki Iwashima <kuniyu@amazon.com>,
Kuniyuki Iwashima <kuni1840@gmail.com>, <netdev@vger.kernel.org>,
<syzkaller-bugs@googlegroups.com>, <linux-kernel@vger.kernel.org>
Subject: [PATCH v1 net 0/5] tcp/udp: Fix memory leaks and data races around IPV6_ADDRFORM.
Date: Tue, 27 Sep 2022 09:12:04 -0700 [thread overview]
Message-ID: <20220927161209.32939-1-kuniyu@amazon.com> (raw)
This series fixes some memory leaks and data races caused in the
same scenario where one thread converts an IPv6 socket into IPv4
with IPV6_ADDRFORM and another accesses the socket concurrently.
Note patch 1 and 5 conflict with these commits in net-next, respectively.
* 24426654ed3a ("bpf: net: Avoid sk_setsockopt() taking sk lock when called from bpf")
* 34704ef024ae ("bpf: net: Change do_tcp_getsockopt() to take the sockptr_t argument")
Kuniyuki Iwashima (5):
tcp/udp: Fix memory leak in ipv6_renew_options().
udp: Call inet6_destroy_sock() in setsockopt(IPV6_ADDRFORM).
tcp/udp: Call inet6_destroy_sock() in IPv4 sk_prot->destroy().
ipv6: Fix data races around sk->sk_prot.
tcp: Fix data races around icsk->icsk_af_ops.
net/core/sock.c | 6 ++++--
net/ipv4/af_inet.c | 23 ++++++++++++++++-------
net/ipv4/tcp.c | 10 ++++++----
net/ipv4/tcp_ipv4.c | 5 +++++
net/ipv4/udp.c | 6 ++++++
net/ipv6/ipv6_sockglue.c | 29 ++++++++++++++---------------
net/ipv6/tcp_ipv6.c | 1 -
7 files changed, 51 insertions(+), 29 deletions(-)
--
2.30.2
next reply other threads:[~2022-09-27 16:13 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-27 16:12 Kuniyuki Iwashima [this message]
2022-09-27 16:12 ` [PATCH v1 net 1/5] tcp/udp: Fix memory leak in ipv6_renew_options() Kuniyuki Iwashima
2022-09-27 16:12 ` [PATCH v1 net 2/5] udp: Call inet6_destroy_sock() in setsockopt(IPV6_ADDRFORM) Kuniyuki Iwashima
2022-09-27 16:12 ` [PATCH v1 net 3/5] tcp/udp: Call inet6_destroy_sock() in IPv4 sk_prot->destroy() Kuniyuki Iwashima
2022-09-27 16:50 ` Eric Dumazet
2022-09-27 17:02 ` Kuniyuki Iwashima
2022-09-27 16:12 ` [PATCH v1 net 4/5] ipv6: Fix data races around sk->sk_prot Kuniyuki Iwashima
2022-09-27 16:12 ` [PATCH v1 net 5/5] tcp: Fix data races around icsk->icsk_af_ops Kuniyuki Iwashima
2022-09-27 16:39 ` Eric Dumazet
2022-09-27 16:48 ` Kuniyuki Iwashima
2022-09-27 16:53 ` Kuniyuki Iwashima
2022-09-27 17:56 ` Eric Dumazet
2022-09-27 16:55 ` Eric Dumazet
2022-09-27 17:07 ` Kuniyuki Iwashima
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=20220927161209.32939-1-kuniyu@amazon.com \
--to=kuniyu@amazon.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=kuni1840@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=syzkaller-bugs@googlegroups.com \
/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
all inboxes | Powered by JetHome®