linux-stable/tools/testing
Andrii Nakryiko b23eae9fc7 selftests/bpf: Fix invalid use of strncat in test_sockmap
[ Upstream commit eceae70bde ]

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: 16962b2404 ("bpf: sockmap, add selftests")
Fixes: 73563aa3d9 ("selftests/bpf: test_sockmap, print additional test options")
Fixes: 1ade9abadf ("bpf: test_sockmap, add options for msg_pop_data() helper")
Fixes: 463bac5f1c ("bpf, selftests: Add test for ktls with skb bpf ingress policy")
Fixes: e9dd904708 ("bpf: add tls support for testing in test_sockmap")
Fixes: 753fb2ee09 ("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
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-12-30 11:53:34 +01:00
..
fault-injection
ktest ktest.pl: Fix the logic for truncating the size of the log file for email 2020-12-21 13:30:06 +01:00
kunit kunit: tool: fix extra trailing \n in raw + parsed test output 2020-11-10 13:44:35 -07:00
nvdimm device-dax: add dis-contiguous resource support 2020-10-13 18:38:28 -07:00
radix-tree ida: Free allocated bitmap in error path 2020-10-07 09:11:33 -04:00
scatterlist tools/testing/scatterlist: Fix test to compile and run 2020-11-17 20:02:20 -04:00
selftests selftests/bpf: Fix invalid use of strncat in test_sockmap 2020-12-30 11:53:34 +01:00
vsock SPDX patches for 5.7-rc1. 2020-04-03 13:12:26 -07:00