Skip to content
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

Enlarge offset check value in bpf_skb_load_bytes #2855

Closed
wants to merge 3 commits into from

Conversation

kernel-patches-bot
Copy link

Pull request for series with
subject: Enlarge offset check value in bpf_skb_load_bytes
version: 1
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=631069

@kernel-patches-bot
Copy link
Author

Master branch: 8de8b71
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=631069
version: 1

@kernel-patches-bot
Copy link
Author

Master branch: 425d239
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=631069
version: 1

@kernel-patches-bot
Copy link
Author

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

Kernel Patches Daemon and others added 3 commits April 12, 2022 23:28
…d_bytes

The data length of skb frags + frag_list may be greater than 0xffff,
and skb_header_pointer can not handle negative offset and negative len.
So here INT_MAX is used to check the validity of offset and len.
Add the same change to the related function skb_store_bytes.

Fixes: 05c74e5 ("bpf: add bpf_skb_load_bytes helper")
Signed-off-by: Liu Jian <liujian56@huawei.com>
Acked-by: Song Liu <songliubraving@fb.com>
Use bpf_prog_test_run_opts to test the skb_load_bytes function.
Tests the behavior when offset is greater than INT_MAX or a normal value.

Signed-off-by: Liu Jian <liujian56@huawei.com>
@kernel-patches-bot
Copy link
Author

Master branch: 425d239
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=631735
version: 2

@kernel-patches-bot
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants