]> git.baikalelectronics.ru Git - kernel.git/commit
mpls: validate L2 via address length
authorRobert Shearman <rshearma@brocade.com>
Thu, 10 Dec 2015 19:30:48 +0000 (19:30 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sat, 12 Dec 2015 05:43:44 +0000 (00:43 -0500)
commitee04936df20aeae5f8c3c3ddcb4fada14f97a1de
treeaa6ceb9dafde5d1279b18da1e994f35a38f361a2
parent2f4e03a077853e58a96e1104f23a9d2bc0d158d0
mpls: validate L2 via address length

If an L2 via address for an mpls nexthop is specified, the length of
the L2 address must match that expected by the output device,
otherwise it could access memory beyond the end of the via address
buffer in the route.

This check was present prior to commit 26167ae9dfa7 ("mpls: multipath
route support"), but got lost in the refactoring, so add it back,
applying it to all nexthops in multipath routes.

Fixes: 26167ae9dfa7 ("mpls: multipath route support")
Signed-off-by: Robert Shearman <rshearma@brocade.com>
Acked-by: Roopa Prabhu <roopa@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/mpls/af_mpls.c