|
@@ -2798,6 +2798,9 @@ static int rtnl_bridge_setlink(struct sk_buff *skb, struct nlmsghdr *nlh)
|
|
|
if (br_spec) {
|
|
|
nla_for_each_nested(attr, br_spec, rem) {
|
|
|
if (nla_type(attr) == IFLA_BRIDGE_FLAGS) {
|
|
|
+ if (nla_len(attr) < sizeof(flags))
|
|
|
+ return -EINVAL;
|
|
|
+
|
|
|
have_flags = true;
|
|
|
flags = nla_get_u16(attr);
|
|
|
break;
|
|
@@ -2868,6 +2871,9 @@ static int rtnl_bridge_dellink(struct sk_buff *skb, struct nlmsghdr *nlh)
|
|
|
if (br_spec) {
|
|
|
nla_for_each_nested(attr, br_spec, rem) {
|
|
|
if (nla_type(attr) == IFLA_BRIDGE_FLAGS) {
|
|
|
+ if (nla_len(attr) < sizeof(flags))
|
|
|
+ return -EINVAL;
|
|
|
+
|
|
|
have_flags = true;
|
|
|
flags = nla_get_u16(attr);
|
|
|
break;
|