From 35c84504cd4291f2580d1be6b7ceaf5c5bab12da Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 12 Jan 2020 13:28:07 +0100 Subject: [PATCH] IPv4: Require "inet" promise for ioctl() on an IPv4Socket --- Kernel/Net/IPv4Socket.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Kernel/Net/IPv4Socket.cpp b/Kernel/Net/IPv4Socket.cpp index f3172ef4a1..3a2d03bc64 100644 --- a/Kernel/Net/IPv4Socket.cpp +++ b/Kernel/Net/IPv4Socket.cpp @@ -435,6 +435,7 @@ KResult IPv4Socket::getsockopt(FileDescription& description, int level, int opti int IPv4Socket::ioctl(FileDescription&, unsigned request, unsigned arg) { + REQUIRE_PROMISE(inet); auto* ifr = (ifreq*)arg; if (!current->process().validate_read_typed(ifr)) return -EFAULT;