From: Cong Wang <hidden> Date: 2021-07-31 19:51:20
From: Cong Wang <redacted>
As of now, only AF_UNIX datagram socket supports sockmap.
But unix_proto is shared for all kinds of AF_UNIX sockets,
so we have to check the socket type in
unix_bpf_update_proto() to explicitly reject other types,
otherwise they could be added into sockmap too.
Fixes: c63829182c37 ("af_unix: Implement ->psock_update_sk_prot()")
Reported-by: Jakub Sitnicki <jakub@cloudflare.com>
Cc: John Fastabend <john.fastabend@gmail.com>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Cc: Lorenz Bauer <redacted>
Signed-off-by: Cong Wang <redacted>
---
net/unix/unix_bpf.c | 3 +++
1 file changed, 3 insertions(+)
From: Jakub Sitnicki <jakub@cloudflare.com> Date: 2021-08-02 09:01:04
On Sat, Jul 31, 2021 at 09:50 PM CEST, Cong Wang wrote:
quoted hunk
From: Cong Wang <redacted>
As of now, only AF_UNIX datagram socket supports sockmap.
But unix_proto is shared for all kinds of AF_UNIX sockets,
so we have to check the socket type in
unix_bpf_update_proto() to explicitly reject other types,
otherwise they could be added into sockmap too.
Fixes: c63829182c37 ("af_unix: Implement ->psock_update_sk_prot()")
Reported-by: Jakub Sitnicki <jakub@cloudflare.com>
Cc: John Fastabend <john.fastabend@gmail.com>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Cc: Lorenz Bauer <redacted>
Signed-off-by: Cong Wang <redacted>
---
net/unix/unix_bpf.c | 3 +++
1 file changed, 3 insertions(+)
Hello:
This patch was applied to bpf/bpf-next.git (refs/heads/master):
On Sat, 31 Jul 2021 12:50:38 -0700 you wrote:
From: Cong Wang <redacted>
As of now, only AF_UNIX datagram socket supports sockmap.
But unix_proto is shared for all kinds of AF_UNIX sockets,
so we have to check the socket type in
unix_bpf_update_proto() to explicitly reject other types,
otherwise they could be added into sockmap too.
[...]