Thread View: linux.kernel.netdev
5 messages
5 total messages
Started by Dmitry Antipov
Mon, 19 Oct 2026 08:22
[PATCH v2] tcp_bpf: propagate error code in tcp_bpf_sendmsg()
Author: Dmitry Antipov
Date: Mon, 19 Oct 2026 08:22
Date: Mon, 19 Oct 2026 08:22
29 lines
6562 bytes
6562 bytes
In tcp_bpf_sendmsg(), the value returned by sk_msg_memcopy_from_iter()
is checked for error but not propagated to 'out_err' label, so error
handling may not work as expected. Fix this by assigning error value
to 'err', thus making sure that error won't be silently ignored.
Reported-by: Sashiko <shodan.ai@mcst.ru>
Fixes: 5153a75ef34b ("tcp_bpf: Fix copied value in tcp_bpf_sendmsg")
Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
---
v2: more descriptive commit message
---
net/ipv4/tcp_bpf.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/ipv4/tcp_bpf.c b/net/ipv4/tcp_bpf.c
index 2e234d155b5e..0ce583f68d3b 100644
--- a/net/ipv4/tcp_bpf.c
+++ b/net/ipv4/tcp_bpf.c
@@ -581,6 +581,7 @@ static int tcp_bpf_sendmsg(struct sock *sk, struct msghdr *msg, size_t size)
copy);
if (ret < 0) {
sk_msg_trim(sk, msg_tx, osize);
+ err = ret;
goto out_err;
}
--
2.56.0
Re: [PATCH v2] tcp_bpf: propagate error code in tcp_bpf_sendmsg()
Author: netdev-bot+sinfo
Date: Mon, 19 Oct 2026 08:28
Date: Mon, 19 Oct 2026 08:28
18 lines
6194 bytes
6194 bytes
Hi! This is an automated message. This series looks like a fix, but its commit messages seem to be missing some information: - Whether the issue was actually triggered, or is only theoretical (e.g. found by code inspection). If it was triggered please include the symptoms, like the stack trace or error messages. Please do not repost the series just to address the above. Instead, reply to this email with the missing information, so that reviewers can take it into account. If the series needs another revision for other reasons, please include the information in the commit messages then. The evaluation is done by an LLM so it may be wrong, if you think that is the case please reply and explain.
Re: [PATCH v2] tcp_bpf: propagate error code in tcp_bpf_sendmsg()
Author: Jason Xing
Date: Tue, 20 Oct 2026 06:23
Date: Tue, 20 Oct 2026 06:23
14 lines
12650 bytes
12650 bytes
On Mon, Oct 19, 2026 at 4:27 PM Dmitry Antipov <dmantipov@yandex.ru> wrote:
>
> In tcp_bpf_sendmsg(), the value returned by sk_msg_memcopy_from_iter()
> is checked for error but not propagated to 'out_err' label, so error
> handling may not work as expected. Fix this by assigning error value
> to 'err', thus making sure that error won't be silently ignored.
>
> Reported-by: Sashiko <shodan.ai@mcst.ru>
> Fixes: 5153a75ef34b ("tcp_bpf: Fix copied value in tcp_bpf_sendmsg")
> Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
Reviewed-by: Jason Xing <kerneljasonxing@gmail.com>
Re: [PATCH v2] tcp_bpf: propagate error code in tcp_bpf_sendmsg()
Author: Eric Dumazet
Date: Tue, 20 Oct 2026 07:50
Date: Tue, 20 Oct 2026 07:50
19 lines
9719 bytes
9719 bytes
Le mar. 20 oct. 2026 à 08:23, Jason Xing <kerneljasonxing@gmail.com> a écrit :
>
> On Mon, Oct 19, 2026 at 4:27 PM Dmitry Antipov <dmantipov@yandex.ru> wrote:
> >
> > In tcp_bpf_sendmsg(), the value returned by sk_msg_memcopy_from_iter()
> > is checked for error but not propagated to 'out_err' label, so error
> > handling may not work as expected. Fix this by assigning error value
> > to 'err', thus making sure that error won't be silently ignored.
> >
> > Reported-by: Sashiko <shodan.ai@mcst.ru>
> > Fixes: 5153a75ef34b ("tcp_bpf: Fix copied value in tcp_bpf_sendmsg")
> > Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
>
> Reviewed-by: Jason Xing <kerneljasonxing@gmail.com>
Reviewed-by: Eric Dumazet <edumazet@kernel.org>
Re: [PATCH v2] tcp_bpf: propagate error code in tcp_bpf_sendmsg()
Author: patchwork-bot+netdevbpf
Date: Wed, 21 Oct 2026 02:50
Date: Wed, 21 Oct 2026 02:50
26 lines
8740 bytes
8740 bytes
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Mon, 19 Oct 2026 11:22:14 +0300 you wrote:
> In tcp_bpf_sendmsg(), the value returned by sk_msg_memcopy_from_iter()
> is checked for error but not propagated to 'out_err' label, so error
> handling may not work as expected. Fix this by assigning error value
> to 'err', thus making sure that error won't be silently ignored.
>
> Reported-by: Sashiko <shodan.ai@mcst.ru>
> Fixes: 5153a75ef34b ("tcp_bpf: Fix copied value in tcp_bpf_sendmsg")
> Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
>
> [...]
Here is the summary with links:
- [v2] tcp_bpf: propagate error code in tcp_bpf_sendmsg()
https://git.kernel.org/netdev/net/c/82e31923c055
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads