mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 01:30:30 -04:00
Properly validte arguments for route deletion
Reported by: Liang Zhuo brightiup.zhuo@gmail.com MFC after: 1 week
This commit is contained in:
parent
2943ddcf51
commit
d8dc4e350f
1 changed files with 2 additions and 0 deletions
|
|
@ -1590,6 +1590,8 @@ rtrequest1_fib(int req, struct rt_addrinfo *info, struct rtentry **ret_nrt,
|
|||
switch (req) {
|
||||
case RTM_DELETE:
|
||||
if (netmask) {
|
||||
if (dst->sa_len > sizeof(mdst))
|
||||
return (EINVAL);
|
||||
rt_maskedcopy(dst, (struct sockaddr *)&mdst, netmask);
|
||||
dst = (struct sockaddr *)&mdst;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue