-
Notifications
You must be signed in to change notification settings - Fork 128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bpf: Fix use-after-free of sockmap #8563
base: bpf-next_base
Are you sure you want to change the base?
Conversation
Upstream branch: 4e4136c |
2f4a9ca
to
f03230d
Compare
Upstream branch: 9138048 |
0113542
to
7e9b9d0
Compare
f03230d
to
a3b8426
Compare
Upstream branch: b123480 |
7e9b9d0
to
ce4c739
Compare
a3b8426
to
f5d8880
Compare
Upstream branch: 4580f4e |
ce4c739
to
d6cfb5b
Compare
f5d8880
to
03b9bd3
Compare
Upstream branch: 0ba0ef0 |
d6cfb5b
to
2ed7c64
Compare
03b9bd3
to
df10b88
Compare
Upstream branch: fc3ab17 |
2ed7c64
to
c6faa8f
Compare
df10b88
to
16566af
Compare
Upstream branch: 43d9d43 |
c6faa8f
to
ba07ab0
Compare
16566af
to
129b680
Compare
Upstream branch: 42c5e6d |
ba07ab0
to
903b0d5
Compare
Upstream branch: 7586e21 |
4a08597
to
2345c88
Compare
83cee19
to
372e928
Compare
Upstream branch: 7586e21 |
2345c88
to
33829c0
Compare
372e928
to
6627a4c
Compare
Upstream branch: 7586e21 |
33829c0
to
7c43806
Compare
6627a4c
to
d1ff1be
Compare
Upstream branch: ad55432 |
7c43806
to
a3774a9
Compare
d1ff1be
to
b91a7a7
Compare
Upstream branch: ad55432 |
a3774a9
to
db82040
Compare
b91a7a7
to
5fd21aa
Compare
Upstream branch: c6287f1 |
db82040
to
fa49f84
Compare
5fd21aa
to
82f3b26
Compare
Upstream branch: c6287f1 |
fa49f84
to
87a88df
Compare
82f3b26
to
2e18d02
Compare
Use RCU lock to protect sk_socket, preventing concurrent close and release by another thread. Because TCP/UDP are already within a relatively large critical section: ''' ip_local_deliver_finish rcu_read_lock ip_protocol_deliver_rcu tcp_rcv/udp_rcv rcu_read_unlock ''' Adding rcu_read_{un}lock() at the entrance and exit of sk_data_ready will not increase performance overhead. Fixes: c638291 ("af_unix: Implement ->psock_update_sk_prot()") Reported-by: [email protected] Closes: https://lore.kernel.org/bpf/[email protected]/ Reviewed-by: Cong Wang <[email protected]> Reviewed-by: John Fastabend <[email protected]> Signed-off-by: Jiayuan Chen <[email protected]>
Current wrapper function create_pair() is used to create a pair of connected links and returns two fds, but it does not support unix sockets. Here we introduce socketpair() into create_pair(), which supports creating a pair of unix sockets, since the semantics of the two are the same. Signed-off-by: Jiayuan Chen <[email protected]>
Add edge case tests for sockmap. Acked-by: Cong Wang <[email protected]> Signed-off-by: Jiayuan Chen <[email protected]>
Upstream branch: 42ba8a4 |
87a88df
to
f1ccbd8
Compare
Pull request for series with
subject: bpf: Fix use-after-free of sockmap
version: 1
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=938035