From 74fed5b52c900fe4449091fc44c0900b9bcb7152 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= Date: Sat, 6 Jan 2018 17:57:34 +0100 Subject: [PATCH] kernel: net_notifications: check user buffer address ... in control syscall --- src/add-ons/kernel/network/notifications/notifications.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/add-ons/kernel/network/notifications/notifications.cpp b/src/add-ons/kernel/network/notifications/notifications.cpp index 839edab235..7fc01918e9 100644 --- a/src/add-ons/kernel/network/notifications/notifications.cpp +++ b/src/add-ons/kernel/network/notifications/notifications.cpp @@ -100,7 +100,7 @@ net_notifications_control(const char *subsystem, uint32 function, void *buffer, if (bufferSize != sizeof(struct net_notifications_control) || function != NET_NOTIFICATIONS_CONTROL_WATCHING) return B_BAD_VALUE; - if (user_memcpy(&control, buffer, + if (!IS_USER_ADDRESS(buffer) || user_memcpy(&control, buffer, sizeof(struct net_notifications_control)) < B_OK) return B_BAD_ADDRESS;