-
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 |
4915a86
to
ddb770c
Compare
818631d
to
9e1d84c
Compare
Upstream branch: 180a46b |
ddb770c
to
2c19412
Compare
9e1d84c
to
7a52608
Compare
Upstream branch: a24a2dd |
2c19412
to
347bac7
Compare
7a52608
to
326d428
Compare
Upstream branch: 6ff4a0f |
347bac7
to
4337391
Compare
326d428
to
acb6b56
Compare
Upstream branch: 3547a61 |
4337391
to
c2db6ec
Compare
acb6b56
to
e94d243
Compare
Upstream branch: 8cd189e |
c2db6ec
to
3fbd12c
Compare
e94d243
to
7ac014f
Compare
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]>
Upstream branch: 815276d |
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]>
3fbd12c
to
120ddc8
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