kernel: net_notifications: check user buffer address ...

in control syscall
This commit is contained in:
Jérôme Duval 2018-01-06 17:57:34 +01:00
parent 9572fa7340
commit 74fed5b52c
1 changed files with 1 additions and 1 deletions

View File

@ -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;