WSL2-Linux-Kernel/samples
Sargun Dhillon 771b894f2f samples/seccomp: Zero out members based on seccomp_notif_sizes
The sizes by which seccomp_notif and seccomp_notif_resp are allocated are
based on the SECCOMP_GET_NOTIF_SIZES ioctl. This allows for graceful
extension of these datastructures. If userspace zeroes out the
datastructure based on its version, and it is lagging behind the kernel's
version, it will end up sending trailing garbage. On the other hand,
if it is ahead of the kernel version, it will write extra zero space,
and potentially cause corruption.

Signed-off-by: Sargun Dhillon <sargun@sargun.me>
Suggested-by: Tycho Andersen <tycho@tycho.ws>
Link: https://lore.kernel.org/r/20191230203503.4925-1-sargun@sargun.me
Fixes: fec7b66905 ("samples: add an example of seccomp user trap")
Cc: stable@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org>
2020-01-02 13:03:39 -08:00
..
auxdisplay auxdisplay: Fix a typo in cfag12864b-example.c 2019-08-08 20:00:18 +02:00
binderfs
bpf samples: bpf: fix syscall_tp due to unused syscall 2019-12-11 15:28:06 -08:00
configfs
connector
ftrace tracing: Sample module to demonstrate kernel access to Ftrace instances. 2019-11-22 19:41:08 -05:00
hidraw
hw_breakpoint
kdb
kfifo treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 465 2019-06-19 17:09:10 +02:00
kobject
kprobes
livepatch
mei samples: mei: use hostprogs kbuild constructs 2019-10-21 12:33:12 -04:00
mic/mpssd treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 290 2019-06-05 17:36:38 +02:00
pidfd samples: make pidfd-metadata fail gracefully on older kernels 2019-06-24 15:55:50 +02:00
pktgen samples: pktgen: allow to specify destination IP range (CIDR) 2019-10-07 09:26:32 -04:00
qmi
rpmsg samples/rpmsg: Introduce a module parameter for message count 2019-08-26 22:10:39 -07:00
seccomp samples/seccomp: Zero out members based on seccomp_notif_sizes 2020-01-02 13:03:39 -08:00
timers
trace_events
trace_printk samples/trace_printk: Wait for IRQ work to finish 2019-12-21 16:08:22 -05:00
uhid
v4l
vfio-mdev vfio-mdev/mtty: Simplify interrupt generation 2019-08-19 13:28:57 -06:00
vfs
watchdog
Kconfig New tracing features: 2019-11-27 11:42:01 -08:00
Makefile New tracing features: 2019-11-27 11:42:01 -08:00