diff options
author | Andrii Nakryiko <andrii@kernel.org> | 2020-12-04 02:54:40 +0300 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2020-12-04 05:07:05 +0300 |
commit | eceae70bdeaeb6b8ceb662983cf663ff352fbc96 (patch) | |
tree | aa96f057c1fc40f0d9f8db8b1ba63808a563933f /include/trace | |
parent | 3015b500ae42356936b9b4a8b660eacaee7a6147 (diff) | |
download | linux-eceae70bdeaeb6b8ceb662983cf663ff352fbc96.tar.xz |
selftests/bpf: Fix invalid use of strncat in test_sockmap
strncat()'s third argument is how many bytes will be added *in addition* to
already existing bytes in destination. Plus extra zero byte will be added
after that. So existing use in test_sockmap has many opportunities to overflow
the string and cause memory corruptions. And in this case, GCC complains for
a good reason.
Fixes: 16962b2404ac ("bpf: sockmap, add selftests")
Fixes: 73563aa3d977 ("selftests/bpf: test_sockmap, print additional test options")
Fixes: 1ade9abadfca ("bpf: test_sockmap, add options for msg_pop_data() helper")
Fixes: 463bac5f1ca7 ("bpf, selftests: Add test for ktls with skb bpf ingress policy")
Fixes: e9dd904708c4 ("bpf: add tls support for testing in test_sockmap")
Fixes: 753fb2ee0934 ("bpf: sockmap, add msg_peek tests to test_sockmap")
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20201203235440.2302137-2-andrii@kernel.org
Diffstat (limited to 'include/trace')
0 files changed, 0 insertions, 0 deletions