diff options
author | Cong Wang <[email protected]> | 2017-11-27 11:15:16 -0800 |
---|---|---|
committer | Steffen Klassert <[email protected]> | 2017-11-29 08:55:29 +0100 |
commit | 6a53b7593233ab9e4f96873ebacc0f653a55c3e1 (patch) | |
tree | d5fcf6bafbc4a4e9cf0f307b20bdc5040c12c414 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | d51aae68b142f48232257e96ce317db25445418d (diff) |
xfrm: check id proto in validate_tmpl()
syzbot reported a kernel warning in xfrm_state_fini(), which
indicates that we have entries left in the list
net->xfrm.state_all whose proto is zero. And
xfrm_id_proto_match() doesn't consider them as a match with
IPSEC_PROTO_ANY in this case.
Proto with value 0 is probably not a valid value, at least
verify_newsa_info() doesn't consider it valid either.
This patch fixes it by checking the proto value in
validate_tmpl() and rejecting invalid ones, like what iproute2
does in xfrm_xfrmproto_getbyname().
Reported-by: syzbot <[email protected]>
Cc: Steffen Klassert <[email protected]>
Cc: Herbert Xu <[email protected]>
Signed-off-by: Cong Wang <[email protected]>
Signed-off-by: Steffen Klassert <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions