]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit0dd7c4ced213b78d55ce5324719ea015b9f17842
tree5386270f315c29fb679d6247f53eae936656fbd4
parentb54aa83a6ea408e9ec43a43b8f87e7a9d7c53463
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