aboutsummaryrefslogtreecommitdiff
path: root/net/ipv4/inet_hashtables.c
diff options
context:
space:
mode:
authorKees Cook <[email protected]>2022-12-23 10:28:44 -0800
committerAlexei Starovoitov <[email protected]>2022-12-28 14:54:53 -0800
commit45435d8da71f9f3e6860e6e6ea9667b6ec17ec64 (patch)
treead5100a0fd034d3ea7a5aeee2bac6c81cf0ee277 /net/ipv4/inet_hashtables.c
parentf90dd663c492124b53bb28db6ff85b50c80ccc32 (diff)
bpf: Always use maximal size for copy_array()
Instead of counting on prior allocations to have sized allocations to the next kmalloc bucket size, always perform a krealloc that is at least ksize(dst) in size (which is a no-op), so the size can be correctly tracked by all the various allocation size trackers (KASAN, __alloc_size, etc). Reported-by: Hyunwoo Kim <[email protected]> Link: https://lore.kernel.org/bpf/20221223094551.GA1439509@ubuntu Fixes: ceb35b666d42 ("bpf/verifier: Use kmalloc_size_roundup() to match ksize() usage") Cc: Alexei Starovoitov <[email protected]> Cc: Daniel Borkmann <[email protected]> Cc: John Fastabend <[email protected]> Cc: Andrii Nakryiko <[email protected]> Cc: Martin KaFai Lau <[email protected]> Cc: Song Liu <[email protected]> Cc: Yonghong Song <[email protected]> Cc: KP Singh <[email protected]> Cc: Stanislav Fomichev <[email protected]> Cc: Hao Luo <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: [email protected] Signed-off-by: Kees Cook <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
Diffstat (limited to 'net/ipv4/inet_hashtables.c')
0 files changed, 0 insertions, 0 deletions