diff options
| author | Dave Airlie <airlied@redhat.com> | 2020-01-20 11:08:11 +1000 |
|---|---|---|
| committer | Dave Airlie <airlied@redhat.com> | 2020-01-20 11:42:57 +1000 |
| commit | 3d4743131b8de970faa4b979ead0fadfe5d2de9d (patch) | |
| tree | 68e948c2d94d48598dd37e31bb654feb0b43ae4a /kernel/seccomp.c | |
| parent | Merge tag 'amd-drm-next-5.6-2020-01-17' of git://people.freedesktop.org/~agd5... (diff) | |
| parent | Linux 5.5-rc7 (diff) | |
| download | linux-3d4743131b8de970faa4b979ead0fadfe5d2de9d.tar.gz linux-3d4743131b8de970faa4b979ead0fadfe5d2de9d.zip | |
Backmerge v5.5-rc7 into drm-next
msm needs 5.5-rc4, go to the latest.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'kernel/seccomp.c')
| -rw-r--r-- | kernel/seccomp.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/kernel/seccomp.c b/kernel/seccomp.c index 12d2227e5786..b6ea3dcb57bf 100644 --- a/kernel/seccomp.c +++ b/kernel/seccomp.c @@ -1026,6 +1026,13 @@ static long seccomp_notify_recv(struct seccomp_filter *filter, struct seccomp_notif unotif; ssize_t ret; + /* Verify that we're not given garbage to keep struct extensible. */ + ret = check_zeroed_user(buf, sizeof(unotif)); + if (ret < 0) + return ret; + if (!ret) + return -EINVAL; + memset(&unotif, 0, sizeof(unotif)); ret = down_interruptible(&filter->notif->request); |
