1
0
Fork 0
alistair23-linux/net/vmw_vsock
David Brazdil 1f935e8e72 selinux: vsock: Set SID for socket returned by accept()
For AF_VSOCK, accept() currently returns sockets that are unlabelled.
Other socket families derive the child's SID from the SID of the parent
and the SID of the incoming packet. This is typically done as the
connected socket is placed in the queue that accept() removes from.

Reuse the existing 'security_sk_clone' hook to copy the SID from the
parent (server) socket to the child. There is no packet SID in this
case.

Fixes: d021c34405 ("VSOCK: Introduce VM Sockets")
Signed-off-by: David Brazdil <dbrazdil@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-03-19 13:46:55 -07:00
..
Kconfig vsock: add vsock_loopback transport 2019-12-11 15:01:23 -08:00
Makefile vsock: add vsock_loopback transport 2019-12-11 15:01:23 -08:00
af_vsock.c selinux: vsock: Set SID for socket returned by accept() 2021-03-19 13:46:55 -07:00
af_vsock_tap.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
diag.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 321 2019-06-05 17:37:05 +02:00
hyperv_transport.c vsock: fix locking in vsock_shutdown() 2021-02-09 15:31:22 -08:00
virtio_transport.c vsock/virtio: annotate 'the_virtio_vsock' RCU pointer 2020-07-15 17:47:15 -07:00
virtio_transport_common.c vsock/virtio: update credit only if socket is not closed 2021-02-08 13:27:46 -08:00
vmci_transport.c vsock/vmci: make vmci_vsock_transport_cb() static 2020-06-05 13:18:26 -07:00
vmci_transport.h vsock: handle buffer_size sockopts in the core 2019-11-14 18:12:18 -08:00
vmci_transport_notify.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 321 2019-06-05 17:37:05 +02:00
vmci_transport_notify.h vsock: remove include/linux/vm_sockets.h file 2019-11-14 18:12:17 -08:00
vmci_transport_notify_qstate.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 321 2019-06-05 17:37:05 +02:00
vsock_addr.c vsock_addr: Check for supported flag values 2020-12-14 19:33:39 -08:00
vsock_loopback.c vsock: add vsock_loopback transport 2019-12-11 15:01:23 -08:00