Comment 2 for bug 1862588

Revision history for this message
Po-Hsu Lin (cypressyew) wrote : Re: user_notification_basic in seccomp of ubuntu_kernel_selftest failed on Bionic-5.0 Oracle

A quick bisect shows this is the cause:
98618307e42790d8a980eb6423ff5b5ebae8db7d is the first bad commit
commit 98618307e42790d8a980eb6423ff5b5ebae8db7d
Author: Sargun Dhillon <email address hidden>
Date: Mon Dec 30 12:38:11 2019 -0800

    selftests/seccomp: Catch garbage on SECCOMP_IOCTL_NOTIF_RECV

    BugLink: https://bugs.launchpad.net/bugs/1860799

    commit e4ab5ccc357b978999328fadae164e098c26fa40 upstream.

    This adds logic to the user_notification_basic test to set a member
    of struct seccomp_notif to an invalid value to ensure that the kernel
    returns EINVAL if any of the struct seccomp_notif members are set to
    invalid values.

    Signed-off-by: Sargun Dhillon <email address hidden>
    Suggested-by: Christian Brauner <email address hidden>
    Link: https://<email address hidden>
    Fixes: 6a21cc50f0c7 ("seccomp: add a return code to trap to userspace")
    Cc: <email address hidden>
    Signed-off-by: Kees Cook <email address hidden>
    Signed-off-by: Greg Kroah-Hartman <email address hidden>
    Signed-off-by: Kamal Mostafa <email address hidden>
    Signed-off-by: Khalid Elmously <email address hidden>

The test will pass with this patch reverted.

However as this patch ensures we have a correct return value EINVAL, so it means this might be a kernel issue.