-
Notifications
You must be signed in to change notification settings - Fork 149
bpf: refactor max_depth computation in bpf_get_stack() #9732
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
base: bpf-next_base
Are you sure you want to change the base?
Conversation
Upstream branch: a578b54 |
ca07a66
to
9ac6848
Compare
Upstream branch: fd2e081 |
d4c2034
to
183eb62
Compare
9ac6848
to
310cb68
Compare
Upstream branch: 32d3766 |
183eb62
to
bf8d075
Compare
310cb68
to
fac3630
Compare
Upstream branch: f7528e4 |
bf8d075
to
f03d713
Compare
fac3630
to
12dd30a
Compare
Upstream branch: 61ee2cc |
f03d713
to
c44430b
Compare
12dd30a
to
ddfc9fa
Compare
Upstream branch: 3ae4c52 |
c44430b
to
4915a86
Compare
ddfc9fa
to
818631d
Compare
Upstream branch: b13448d |
A new helper function stack_map_calculate_max_depth() that computes the max depth for a stackmap. Acked-by: Yonghong Song <[email protected]> Acked-by: Song Liu <[email protected]> Signed-off-by: Arnaud Lecomte <[email protected]>
Clean-up bounds checking for trace->nr in __bpf_get_stack by limiting it only to max_depth. Acked-by: Song Liu <[email protected]> Cc: Song Liu <[email protected]> Signed-off-by: Arnaud Lecomte <[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") Acked-by: Yonghong Song <[email protected]> Acked-by: Song Liu <[email protected]> Signed-off-by: Arnaud Lecomte <[email protected]>
4915a86
to
ddb770c
Compare
Pull request for series with
subject: bpf: refactor max_depth computation in bpf_get_stack()
version: 9
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=1001977