xfrm4: Fix header checks in _decode_session4.
authorSteffen Klassert <steffen.klassert@secunet.com>
Fri, 23 Oct 2015 05:31:23 +0000 (07:31 +0200)
committerSteffen Klassert <steffen.klassert@secunet.com>
Fri, 23 Oct 2015 05:31:23 +0000 (07:31 +0200)
commit1a14f1e5550a341f76e5c8f596e9b5f8a886dfbc
tree51d56a04d8d955f1eb661d239f4ec01f226b0ae5
parente33d4f13d21e9f604194ebc8730077ff39916c50
xfrm4: Fix header checks in _decode_session4.

We skip the header informations if the data pointer points
already behind the header in question for some protocols.
This is because we call pskb_may_pull with a negative value
converted to unsigened int from pskb_may_pull in this case.
Skipping the header informations can lead to incorrect policy
lookups, so fix it by a check of the data pointer position
before we call pskb_may_pull.

Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
net/ipv4/xfrm4_policy.c