Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F157434108
D56916.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
677 B
Referenced Files
None
Subscribers
None
D56916.diff
View Options
diff --git a/sys/netlink/netlink_message_parser.h b/sys/netlink/netlink_message_parser.h
--- a/sys/netlink/netlink_message_parser.h
+++ b/sys/netlink/netlink_message_parser.h
@@ -315,6 +315,12 @@
nl_get_attrs_bmask_nlmsg(struct nlmsghdr *hdr,
const struct nlhdr_parser *parser, struct nlattr_bmask *bm)
{
+ if (__predict_false(hdr->nlmsg_len - sizeof(struct nlmsghdr) <
+ parser->nl_hdr_off)) {
+ /* Doesn't make sense to call nl_alloc_compat_hdr() here. */
+ BIT_ZERO(NL_ATTR_BMASK_SIZE, bm);
+ return;
+ }
nl_get_attrs_bmask_raw(
(struct nlattr *)((char *)(hdr + 1) + parser->nl_hdr_off),
hdr->nlmsg_len - sizeof(*hdr) - parser->nl_hdr_off, bm);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, May 22, 10:29 AM (6 h, 5 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
32906196
Default Alt Text
D56916.diff (677 B)
Attached To
Mode
D56916: netlink: fix unsigned overflow on a truncated message
Attached
Detach File
Event Timeline
Log In to Comment