]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: Test ref release issue in bpf_tcp_sock and bpf_sk_fullsock
authorMartin KaFai Lau <kafai@fb.com>
Tue, 12 Mar 2019 17:23:09 +0000 (10:23 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 13 Mar 2019 19:04:35 +0000 (12:04 -0700)
commit59db11c26669d33e743dc7f15d325f121dada582
tree32f0c9d89a04f571a0ee340c4d20c262a6201986
parent42fe7e5325f0cdcda603add94438a5acc5574e7f
bpf: Test ref release issue in bpf_tcp_sock and bpf_sk_fullsock

Adding verifier tests to ensure the ptr returned from bpf_tcp_sock() and
bpf_sk_fullsock() cannot be accessed after bpf_sk_release() is called.
A few of the tests are derived from a reproducer test by Lorenz Bauer.

Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/verifier/ref_tracking.c
tools/testing/selftests/bpf/verifier/sock.c