mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 09:41:03 -04:00
Range-check the address family parameter passed in to the sysctl handler.
Submitted by: ru
This commit is contained in:
parent
42e9e16d2b
commit
b2aaf46eae
1 changed files with 2 additions and 0 deletions
|
|
@ -1017,6 +1017,8 @@ sysctl_rtsock(SYSCTL_HANDLER_ARGS)
|
|||
if (namelen != 3)
|
||||
return ((namelen < 3) ? EISDIR : ENOTDIR);
|
||||
af = name[0];
|
||||
if (af > AF_MAX)
|
||||
return (EINVAL);
|
||||
Bzero(&w, sizeof(w));
|
||||
w.w_op = name[1];
|
||||
w.w_arg = name[2];
|
||||
|
|
|
|||
Loading…
Reference in a new issue