]> git.itanic.dy.fi Git - linux-stable/commit
net/sched: pedit: make sure that offset is valid
authorAmir Vadai <amir@vadai.me>
Mon, 28 Nov 2016 10:56:40 +0000 (12:56 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 10 Dec 2016 18:09:39 +0000 (19:09 +0100)
commit360d6a23e79d68c570a9346c1ad07854d1abb434
tree9d294b50ee493a62f0cf10ee0782e9c1373d8b59
parentaa239369bdfa73290be0f743a22c637cfee1967b
net/sched: pedit: make sure that offset is valid

[ Upstream commit 95c2027bfeda21a28eb245121e6a249f38d0788e ]

Add a validation function to make sure offset is valid:
1. Not below skb head (could happen when offset is negative).
2. Validate both 'offset' and 'at'.

Signed-off-by: Amir Vadai <amir@vadai.me>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/sched/act_pedit.c