-
Notifications
You must be signed in to change notification settings - Fork 5
bpf: refactor max_depth computation in bpf_get_stack() #5903
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
bpf: refactor max_depth computation in bpf_get_stack() #5903
Conversation
|
Upstream branch: 9621eb6 |
c979e9f to
2d215b0
Compare
|
Upstream branch: e12873e |
5f716ac to
cc71798
Compare
2d215b0 to
05282f4
Compare
|
Upstream branch: 93a83d0 |
cc71798 to
39f578b
Compare
05282f4 to
e2bfc81
Compare
|
Upstream branch: 60ef541 |
39f578b to
63183c9
Compare
e2bfc81 to
ba991b7
Compare
|
Upstream branch: f859813 |
63183c9 to
aab9b18
Compare
A new helper function stack_map_calculate_max_depth() that computes the max depth for a stackmap. Signed-off-by: Arnaud Lecomte <[email protected]> Acked-by: Yonghong Song <[email protected]> Acked-by: Song Liu <[email protected]>
Clean-up bounds checking for trace->nr in __bpf_get_stack by limiting it only to max_depth. Signed-off-by: Arnaud Lecomte <[email protected]> Acked-by: Song Liu <[email protected]> Cc: Song Liu <[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. Reported-by: [email protected] Closes: https://syzkaller.appspot.com/bug?extid=c9b724fbb41cf2538b7b Fixes: ee2a098 ("bpf: Adjust BPF stack helper functions to accommodate skip > 0") Signed-off-by: Arnaud Lecomte <[email protected]> Acked-by: Yonghong Song <[email protected]> Acked-by: Song Liu <[email protected]>
|
Upstream branch: f859813 |
aab9b18 to
1bbbbc4
Compare
|
At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=999349 expired. Closing PR. |
Pull request for series with
subject: bpf: refactor max_depth computation in bpf_get_stack()
version: 8
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=999349