IPv4: Require "inet" promise for ioctl() on an IPv4Socket
This commit is contained in:
parent
a27d2b7b32
commit
35c84504cd
Notes:
sideshowbarker
2024-07-19 10:08:02 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/35c84504cd4
1 changed files with 1 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue