diff options
author | andre <andre@FreeBSD.org> | 2006-01-18 15:05:05 +0000 |
---|---|---|
committer | andre <andre@FreeBSD.org> | 2006-01-18 15:05:05 +0000 |
commit | 175b38b9db1d424471b6a9d63269495d4766e56f (patch) | |
tree | 8d587abfb5fcac9cb572df2e215e3d1ff8a9f337 /sys | |
parent | 21685508caa8917ae676d3c8a18633535b47b033 (diff) | |
download | FreeBSD-src-175b38b9db1d424471b6a9d63269495d4766e56f.zip FreeBSD-src-175b38b9db1d424471b6a9d63269495d4766e56f.tar.gz |
Prevent dereferencing a NULL route pointer when trying to update the
route MTU.
This bug is very difficult to reach and not remotely exploitable.
Found by: Coverity Prevent(tm)
Coverity ID: CID162
Sponsored by: TCP/IP Optimization Fundraise 2005
MFC after: 3 days
Diffstat (limited to 'sys')
-rw-r--r-- | sys/netinet/ip_output.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c index b8599e6..2124c74 100644 --- a/sys/netinet/ip_output.c +++ b/sys/netinet/ip_output.c @@ -790,7 +790,8 @@ passout: * them, there is no way for one to update all its * routes when the MTU is changed. */ - if ((ro->ro_rt->rt_flags & (RTF_UP | RTF_HOST)) && + if (ro != NULL && + (ro->ro_rt->rt_flags & (RTF_UP | RTF_HOST)) && (ro->ro_rt->rt_rmx.rmx_mtu > ifp->if_mtu)) { ro->ro_rt->rt_rmx.rmx_mtu = ifp->if_mtu; } |