Re: [PATCH bpf] skmsg: Fix invalid last sg check in sk_msg_recvmsg()
From: patchwork-bot+netdevbpf@kernel.org
Date: 2022-07-11 16:30:21
Also in:
bpf
From: patchwork-bot+netdevbpf@kernel.org
Date: 2022-07-11 16:30:21
Also in:
bpf
Hello: This patch was applied to bpf/bpf-next.git (master) by Daniel Borkmann [off-list ref]: On Tue, 28 Jun 2022 20:36:16 +0800 you wrote:
In sk_psock_skb_ingress_enqueue function, if the linear area + nr_frags + frag_list of the SKB has NR_MSG_FRAG_IDS blocks in total, skb_to_sgvec will return NR_MSG_FRAG_IDS, then msg->sg.end will be set to NR_MSG_FRAG_IDS, and in addition, (NR_MSG_FRAG_IDS - 1) is set to the last SG of msg. Recv the msg in sk_msg_recvmsg, when i is (NR_MSG_FRAG_IDS - 1), the sk_msg_iter_var_next(i) will change i to 0 (not NR_MSG_FRAG_IDS), the judgment condition "msg_rx->sg.start==msg_rx->sg.end" and "i != msg_rx->sg.end" can not work. [...]
Here is the summary with links:
- [bpf] skmsg: Fix invalid last sg check in sk_msg_recvmsg()
https://git.kernel.org/bpf/bpf-next/c/9974d37ea75f
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html