Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F157155291
D56963.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
716 B
Referenced Files
None
Subscribers
None
D56963.diff
View Options
diff --git a/sys/netlink/route/rt.c b/sys/netlink/route/rt.c
--- a/sys/netlink/route/rt.c
+++ b/sys/netlink/route/rt.c
@@ -479,8 +479,9 @@
for (rtnh = (struct rtnexthop *)(nla + 1); data_len > 0; ) {
struct rta_mpath_nh *mpnh;
+ len = NL_ITEM_ALIGN(rtnh->rtnh_len);
if (__predict_false(rtnh->rtnh_len <= sizeof(*rtnh) ||
- rtnh->rtnh_len > data_len)) {
+ len < rtnh->rtnh_len || len > data_len)) {
NLMSG_REPORT_ERR_MSG(npt, "%s: bad length %u",
__func__, rtnh->rtnh_len);
return (EINVAL);
@@ -494,7 +495,6 @@
mp->num_nhops - 1);
return (error);
}
- len = NL_ITEM_ALIGN(rtnh->rtnh_len);
data_len -= len;
rtnh = (struct rtnexthop *)((char *)rtnh + len);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, May 19, 8:31 PM (19 h, 17 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33023749
Default Alt Text
D56963.diff (716 B)
Attached To
Mode
D56963: rtnetlink: Align RTA_MULTIPATH length validation in nlattr_get
Attached
Detach File
Event Timeline
Log In to Comment