Skip to content

Conversation

@kernel-patches-daemon-bpf-rc
Copy link

Pull request for series with
subject: bpf: liveness: Handle ERR_PTR from get_outer_instance() in propagate_to_outer_instance()
version: 2
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=1013390

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: 1c64efc
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=1013390
version: 2

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: 1c64efc
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=1013390
version: 2

…to_outer_instance()

propagate_to_outer_instance() calls get_outer_instance() and then uses the
returned pointer to reset/commit stack write marks. When get_outer_instance()
fails (e.g., __lookup_instance() returns -ENOMEM), it may return an ERR_PTR.
Without a check, the code dereferences this error pointer.

Protect the call with IS_ERR() and propagate the error.

Reported-by: kernel-patches-review-bot (kernel-patches/bpf#10006 (comment))
Signed-off-by: Shardul Bankar <[email protected]>
v2: Drop Fixes tag per Eduard’s review (not a functional bug).
@kernel-patches-daemon-bpf-rc
Copy link
Author

At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=1013390 expired. Closing PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants