From: Matthieu Baerts <matttbe@kernel.org>
To: Kuniyuki Iwashima <kuniyu@google.com>
Cc: MPTCP Linux <mptcp@lists.linux.dev>
Subject: Re: [PATCH mptcp-net] mptcp: bpf: fix type confusion in bpf_mptcp_sock_from_subflow()
Date: Thu, 30 Apr 2026 22:45:10 +0200 [thread overview]
Message-ID: <fb2d66e0-b2bf-484d-85e3-c325d99bbfb2@kernel.org> (raw)
In-Reply-To: <CAAVpQUDeJRSTympB2QqQv8Ouc+WRnM_HjVyitqngQiM3Uayh4Q@mail.gmail.com>
Hi Kuniyuki,
On 30/04/2026 22:35, Kuniyuki Iwashima wrote:
> On Thu, Apr 30, 2026 at 1:27 PM Matthieu Baerts (NGI0)
> <matttbe@kernel.org> wrote:
>>
>> bpf_mptcp_sock_from_subflow() only checks if sk->sk_protocol is
>> IPPROTO_TCP, but RAW socket can bypass it:
>>
>> socket(AF_INET, SOCK_RAW, IPPROTO_TCP)
>>
>> In this case, it would NOT be valid to call sk_is_mptcp() which will
>> assume sk is a pointer to a struct tcp_sock, and wrongly checks for:
>> tcp_sk(sk)->is_mptcp.
>>
>> This is similar to the modification done on TCP side [1], by Kuniyuki.
>>
>> Fixes: 3bc253c2e652 ("bpf: Add bpf_skc_to_mptcp_sock_proto")
>> Link: https://lore.kernel.org/20260430184405.1227386-1-kuniyu@google.com [1]
>> Cc: Kuniyuki Iwashima <kuniyu@google.com>
>> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
>
> Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>
Thank you for the review!
If you need to send a v2 of your series to the BPF ML, feel free to
include this patch (without the last sentence, the Link and the Cc
tags). But I can also send it separately later if preferred, up to you.
Cheers,
Matt
--
Sponsored by the NGI0 Core fund.
next prev parent reply other threads:[~2026-04-30 20:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-30 20:27 [PATCH mptcp-net] mptcp: bpf: fix type confusion in bpf_mptcp_sock_from_subflow() Matthieu Baerts (NGI0)
2026-04-30 20:35 ` Kuniyuki Iwashima
2026-04-30 20:45 ` Matthieu Baerts [this message]
2026-04-30 20:48 ` Kuniyuki Iwashima
2026-04-30 20:53 ` Matthieu Baerts
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fb2d66e0-b2bf-484d-85e3-c325d99bbfb2@kernel.org \
--to=matttbe@kernel.org \
--cc=kuniyu@google.com \
--cc=mptcp@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.