Properly validte arguments for route deletion
Reported by: Liang Zhuo brightiup.zhuo@gmail.com MFC after: 1 week
This commit is contained in:
parent
779520855e
commit
40bd736195
@ -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 New Issue
Block a user