summaryrefslogtreecommitdiff
path: root/net/xfrm/xfrm_hash.c
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2007-05-14 02:15:47 -0700
committerDavid S. Miller <davem@davemloft.net>2007-05-14 02:15:47 -0700
commitb5505c6e1071b32176c7548a3aaf0be49f7c763e (patch)
tree3c534e5b0381422356053511e01b40ac461508a5 /net/xfrm/xfrm_hash.c
parent705962ccc9d21a08b74b6b6e1d3cf10f98968a67 (diff)
downloadlinux-3.10-b5505c6e1071b32176c7548a3aaf0be49f7c763e.tar.gz
linux-3.10-b5505c6e1071b32176c7548a3aaf0be49f7c763e.tar.bz2
linux-3.10-b5505c6e1071b32176c7548a3aaf0be49f7c763e.zip
[IPSEC]: Check validity of direction in xfrm_policy_byid
The function xfrm_policy_byid takes a dir argument but finds the policy using the index instead. We only use the dir argument to update the policy count for that direction. Since the user can supply any value for dir, this can corrupt our policy count. I know this is the problem because a few days ago I was deleting policies by hand using indicies and accidentally typed in the wrong direction. It still deleted the policy and at the time I thought that was cool. In retrospect it isn't such a good idea :) I decided against letting it delete the policy anyway just in case we ever remove the connection between indicies and direction. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/xfrm/xfrm_hash.c')
0 files changed, 0 insertions, 0 deletions