OSDN Git Service

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:07:23 +0000 (19:07 +0100)
commit6c42bd6a393c3c7b3be24f9bf57a26608df14739
tree54229f806387af348f46d0a79f780bf3f695f446
parentcfa7c16d4577a6e738bbd2bc83c6c8d7344e2d1a
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