Re: [PATCH v2 1/2] samples, selftests/seccomp: Zero out seccomp_notif

From: Christian Brauner
Date: Sat Dec 28 2019 - 04:31:43 EST


On Sat, Dec 28, 2019 at 01:48:39AM +0000, Sargun Dhillon wrote:
> The seccomp_notif structure should be zeroed out prior to calling the
> SECCOMP_IOCTL_NOTIF_RECV ioctl. Previously, the kernel did not check
> whether these structures were zeroed out or not, so these worked.
>
> Signed-off-by: Sargun Dhillon <sargun@xxxxxxxxx>
> Cc: Kees Cook <keescook@xxxxxxxxxxxx>

Can you please also add a test, that verifies that we catch garbage
values, please?