Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

rtnetlink: Call nlmsg_parse() with correct header length

Signed-off-by: Michael Riesch <michael.riesch@omicron.at>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Benc <jbenc@redhat.com>
Cc: "Theodore Ts'o" <tytso@mit.edu>
Cc: linux-kernel@vger.kernel.org
Acked-by: Mark Rustad <mark.d.rustad@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Michael Riesch and committed by
David S. Miller
88c5b5ce 69b0216a

+2 -2
+2 -2
net/core/rtnetlink.c
··· 1072 1072 rcu_read_lock(); 1073 1073 cb->seq = net->dev_base_seq; 1074 1074 1075 - if (nlmsg_parse(cb->nlh, sizeof(struct rtgenmsg), tb, IFLA_MAX, 1075 + if (nlmsg_parse(cb->nlh, sizeof(struct ifinfomsg), tb, IFLA_MAX, 1076 1076 ifla_policy) >= 0) { 1077 1077 1078 1078 if (tb[IFLA_EXT_MASK]) ··· 1922 1922 u32 ext_filter_mask = 0; 1923 1923 u16 min_ifinfo_dump_size = 0; 1924 1924 1925 - if (nlmsg_parse(nlh, sizeof(struct rtgenmsg), tb, IFLA_MAX, 1925 + if (nlmsg_parse(nlh, sizeof(struct ifinfomsg), tb, IFLA_MAX, 1926 1926 ifla_policy) >= 0) { 1927 1927 if (tb[IFLA_EXT_MASK]) 1928 1928 ext_filter_mask = nla_get_u32(tb[IFLA_EXT_MASK]);