-
Notifications
You must be signed in to change notification settings - Fork 148
bpf: refactor max_depth computation in bpf_get_stack() #9523
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Upstream branch: bf7a6a6 |
1a79214
to
d47111e
Compare
Upstream branch: b5bbbb7 |
91f2407
to
d7e87d1
Compare
d47111e
to
d07b74e
Compare
Upstream branch: 2693227 |
d7e87d1
to
d117128
Compare
d07b74e
to
5057c80
Compare
Upstream branch: 78e097f |
d117128
to
81bffe4
Compare
5057c80
to
568f554
Compare
Upstream branch: 21aeabb |
81bffe4
to
b5fe738
Compare
568f554
to
df02f89
Compare
Upstream branch: 0780f54 |
A new helper function stack_map_calculate_max_depth() that computes the max depth for a stackmap. Changes in v2: - Removed the checking 'map_size % map_elem_size' from stack_map_calculate_max_depth - Changed stack_map_calculate_max_depth params name to be more generic Changes in v3: - Changed map size param to size in max depth helper Changes in v4: - Fixed indentation in max depth helper for args Link to v3: https://lore.kernel.org/all/[email protected]/ Signed-off-by: Arnaud Lecomte <[email protected]> Acked-by: Yonghong Song <[email protected]>
Syzkaller reported a KASAN slab-out-of-bounds write in __bpf_get_stackid() when copying stack trace data. The issue occurs when the perf trace contains more stack entries than the stack map bucket can hold, leading to an out-of-bounds write in the bucket's data array. Changes in v2: - Fixed max_depth names across get stack id Changes in v4: - Removed unnecessary empty line in __bpf_get_stackid Link to v3: https://lore.kernel.org/all/[email protected]/ Reported-by: [email protected] Closes: https://syzkaller.appspot.com/bug?extid=c9b724fbb41cf2538b7b Signed-off-by: Arnaud Lecomte <[email protected]> Acked-by: Yonghong Song <[email protected]>
b5fe738
to
832975b
Compare
At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=993141 expired. Closing PR. |
Pull request for series with
subject: bpf: refactor max_depth computation in bpf_get_stack()
version: 4
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=993141