-
Notifications
You must be signed in to change notification settings - Fork 6
libbpf: Fix null pointer dereference in btf_dump__free on allocation failure #5475
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?
libbpf: Fix null pointer dereference in btf_dump__free on allocation failure #5475
Conversation
Upstream branch: f66b4aa |
e4229a5
to
67cf54d
Compare
Upstream branch: a633dab |
b9f79ba
to
1f379aa
Compare
67cf54d
to
401f25f
Compare
Upstream branch: 66ab68c |
1f379aa
to
15045e3
Compare
401f25f
to
149ef41
Compare
At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=972865 expired. Closing PR. |
Upstream branch: bd07bd1 |
15045e3
to
359dc34
Compare
6a06f9d
to
45c71f6
Compare
Upstream branch: cd7312a |
359dc34
to
29352c0
Compare
45c71f6
to
4516bd2
Compare
Upstream branch: e30329b |
29352c0
to
6d1fdd5
Compare
4516bd2
to
983d136
Compare
Upstream branch: 99fe8af |
…failure When btf_dump__new() fails to allocate memory for the internal hashmap (btf_dump->type_names), it returns an error code. However, the cleanup function btf_dump__free() does not check if btf_dump->type_names is NULL before attempting to free it. This leads to a null pointer dereference when btf_dump__free() is called on a btf_dump object. Fix: 351131b ("libbpf: add btf_dump API for BTF-to-C conversion") Signed-off-by: chenyuan <[email protected]>
6d1fdd5
to
4d808c5
Compare
Pull request for series with
subject: libbpf: Fix null pointer dereference in btf_dump__free on allocation failure
version: 1
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=972865