net: sched: ife: check on metadata length
authorAlexander Aring <aring@mojatatu.com>
Fri, 20 Apr 2018 19:15:05 +0000 (15:15 -0400)
committerDavid S. Miller <davem@davemloft.net>
Mon, 23 Apr 2018 01:12:00 +0000 (21:12 -0400)
commitd57493d6d1be26c8ac8516a4463bfe24956978eb
tree5386270f315c29fb679d6247f53eae936656fbd4
parentcc74eddd0ff325d57373cea99f642b787d7f76f5
net: sched: ife: check on metadata length

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>
net/ife/ife.c