diff options
author | Daniel Xu <[email protected]> | 2020-11-17 12:05:46 -0800 |
---|---|---|
committer | Alexei Starovoitov <[email protected]> | 2020-11-19 11:58:15 -0800 |
commit | c8a36aedf3e24768e94d87fdcdd37684bd241c44 (patch) | |
tree | 5eadde2770ff55b99a77d39e56e9b3dc322ce628 /scripts/gcc-plugins/cyc_complexity_plugin.c | |
parent | 6fa6d28051e9fcaa1570e69648ea13a353a5d218 (diff) |
selftest/bpf: Test bpf_probe_read_user_str() strips trailing bytes after NUL
Previously, bpf_probe_read_user_str() could potentially overcopy the
trailing bytes after the NUL due to how do_strncpy_from_user() does the
copy in long-sized strides. The issue has been fixed in the previous
commit.
This commit adds a selftest that ensures we don't regress
bpf_probe_read_user_str() again.
Signed-off-by: Daniel Xu <[email protected]>
Signed-off-by: Alexei Starovoitov <[email protected]>
Acked-by: Song Liu <[email protected]>
Acked-by: Andrii Nakryiko <[email protected]>
Link: https://lore.kernel.org/bpf/4d977508fab4ec5b7b574b85bdf8b398868b6ee9.1605642949.git.dxu@dxuuu.xyz
Diffstat (limited to 'scripts/gcc-plugins/cyc_complexity_plugin.c')
0 files changed, 0 insertions, 0 deletions