linux-user: Prevent crash in epoll_ctl
authorLemonBoy <thatlemon@gmail.com>
Fri, 17 Apr 2020 15:34:54 +0000 (17:34 +0200)
committerLaurent Vivier <laurent@vivier.eu>
Wed, 11 Nov 2020 10:01:08 +0000 (11:01 +0100)
commitc7811022ebfcaae64e06383ff734f3b3651bf892
tree223144ac5f8d4fc8cac3b114f55b10d7d5505165
parentce437484fced8292d90497d7b740335428fffed6
linux-user: Prevent crash in epoll_ctl

From 894bb5172705e46a3a04c93b4962c0f0cafee814 Mon Sep 17 00:00:00 2001
From: Giuseppe Musacchio <thatlemon@gmail.com>
Date: Fri, 17 Apr 2020 17:25:07 +0200
Subject: [PATCH] linux-user: Prevent crash in epoll_ctl

The `event` parameter is ignored by the kernel if `op` is EPOLL_CTL_DEL,
do the same and avoid returning EFAULT if garbage is passed instead of a
valid pointer.

Signed-off-by: Giuseppe Musacchio <thatlemon@gmail.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <a244fa67-dace-abdb-995a-3198bd80fee8@gmail.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
linux-user/syscall.c