-
Notifications
You must be signed in to change notification settings - Fork 5
tools/bpf/bpftool: fix buffer handling in get_fd_type() #5866
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
tools/bpf/bpftool: fix buffer handling in get_fd_type() #5866
Conversation
|
Upstream branch: 98857d1 |
27199db to
bed149f
Compare
|
Upstream branch: 6417ca8 |
8ea2329 to
a84ffa5
Compare
bed149f to
c32e265
Compare
|
Upstream branch: e4980fa |
a84ffa5 to
8b30662
Compare
c32e265 to
0e26bd3
Compare
|
Upstream branch: c9110e6 |
8b30662 to
977c070
Compare
0e26bd3 to
4e70ac0
Compare
|
Upstream branch: abc8a95 |
977c070 to
7015d3d
Compare
4e70ac0 to
c04dd5a
Compare
|
Upstream branch: 929adf8 |
7015d3d to
c0f6725
Compare
c04dd5a to
4754b79
Compare
|
Upstream branch: 2d92ef7 |
c0f6725 to
5b3d390
Compare
4754b79 to
af15c58
Compare
|
Upstream branch: b338cf8 |
5b3d390 to
8421726
Compare
af15c58 to
c979e9f
Compare
|
Upstream branch: 9621eb6 |
8421726 to
ae3646e
Compare
c979e9f to
2d215b0
Compare
The current check "if (n == sizeof(buf))" is incorrect for detecting buffer overflow from readlink(). When readlink() fills the entire buffer, it returns sizeof(buf) but does not null-terminate the string, leading to potential buffer overrun in subsequent string operations. Fix by changing the condition to "n >= sizeof(buf)" to properly detect when the buffer is completely filled, ensuring space is reserved for null termination. Signed-off-by: Kaushlendra Kumar <[email protected]>
|
Upstream branch: e12873e |
ae3646e to
7a5b71e
Compare
|
At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=997512 expired. Closing PR. |
Pull request for series with
subject: tools/bpf/bpftool: fix buffer handling in get_fd_type()
version: 1
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=997512