WSL2-Linux-Kernel/include
David Herrmann aae7cfcbb7 security: add hook for socketpair()
Right now the LSM labels for socketpairs are always uninitialized,
since there is no security hook for the socketpair() syscall. This
patch adds the required hooks so LSMs can properly label socketpairs.
This allows SO_PEERSEC to return useful information on those sockets.

Note that the behavior of socketpair() can be emulated by creating a
listener socket, connecting to it, and then discarding the initial
listener socket. With this workaround, SO_PEERSEC would return the
caller's security context. However, with socketpair(), the uninitialized
context is returned unconditionally. This is unexpected and makes
socketpair() less useful in situations where the security context is
crucial to the application.

With the new socketpair-hook this disparity can be solved by making
socketpair() return the expected security context.

Acked-by: Serge Hallyn <serge@hallyn.com>
Signed-off-by: Tom Gundersen <teg@jklm.no>
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: James Morris <james.morris@microsoft.com>
2018-05-04 12:48:54 -07:00
..
acpi
asm-generic earlycon: Use a pointer table to fix __earlycon_table stride 2018-04-23 10:06:59 +02:00
clocksource
crypto
drm
dt-bindings
keys
kvm arm/arm64: KVM: Add PSCI version selection API 2018-04-20 16:32:23 +01:00
linux security: add hook for socketpair() 2018-05-04 12:48:54 -07:00
math-emu
media
memory
misc
net net: sched: ife: handle malformed tlv length 2018-04-22 21:12:00 -04:00
pcmcia
ras
rdma
scsi scsi: core: remove reference to scsi_show_extd_sense() 2018-04-18 23:37:39 -04:00
soc
sound ALSA: control: Hardening for potential Spectre v1 2018-04-25 10:37:46 +02:00
target
trace Following tracing fixes: 2018-04-26 16:22:47 -07:00
uapi Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2018-04-29 09:03:25 -07:00
video
xen xen/sndif: Sync up with the canonical definition in Xen 2018-04-17 08:26:33 -04:00