net: sched: ife: check on metadata length
authorAlexander Aring <aring@mojatatu.com>
Fri, 20 Apr 2018 19:15:05 +0000 (15:15 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 29 Apr 2018 09:33:13 +0000 (11:33 +0200)
commit4c2c574cf6ed0bbbddaac3d78061116230adea11
tree184665b76a64fca8ff1334085805ac3ac9fbe572
parent388f3d9708fcc96cea44fe343ffe055e58ba6e6b
net: sched: ife: check on metadata length

[ Upstream commit d57493d6d1be26c8ac8516a4463bfe24956978eb ]

This patch checks if sk buffer is available to dererence ife header. If
not then NULL will returned to signal an malformed ife packet. This
avoids to crashing the kernel from outside.

Signed-off-by: Alexander Aring <aring@mojatatu.com>
Reviewed-by: Yotam Gigi <yotam.gi@gmail.com>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/ife/ife.c