mptcp: better validation of MPTCPOPT_MP_JOIN option
Subsystems (3)
cover mptcp: better validation of MPTCPOPT_MP_JOIN option
Based on a syzbot report (see 4th patch in the series).
We need to be more explicit about which one of the following flag is set by mptcp_parse_option():
- OPTION_MPTCP_MPJ_SYN
- OPTION_MPTCP_MPJ_SYNACK
- OPTION_MPTCP_MPJ_ACK
Then select the appropriate values instead of OPTIONS_MPTCP_MPJ
Paolo suggested to do the same for OPTIONS_MPTCP_MPC (5th patch)
Eric Dumazet (5):
mptcp: mptcp_parse_option() fix for MPTCPOPT_MP_JOIN
mptcp: strict validation before using mp_opt->hmac
mptcp: use OPTION_MPTCP_MPJ_SYNACK in subflow_finish_connect()
mptcp: use OPTION_MPTCP_MPJ_SYN in subflow_check_req()
mptcp: refine opt_mp_capable determination
net/mptcp/options.c | 6 +++--- net/mptcp/subflow.c | 16 ++++++++-------- 2 files changed, 11 insertions(+), 11 deletions(-)
Signature · 1 line
2.43.0.275.g3460e3d667-goog
PATCH 1/5 mptcp: mptcp_parse_option() fix for MPTCPOPT_MP_JOIN
mptcp_parse_option() currently sets OPTIONS_MPTCP_MPJ, for the three possible cases handled for MPTCPOPT_MP_JOIN option.
OPTIONS_MPTCP_MPJ is the combination of three flags:
- OPTION_MPTCP_MPJ_SYN
- OPTION_MPTCP_MPJ_SYNACK
- OPTION_MPTCP_MPJ_ACK
This is a problem, because backup, join_id, token, nonce and/or hmac fields could be left uninitialized in some cases.
Distinguish the three cases, as following patches will need this step.
--- net/mptcp/options.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
net/mptcp/options.c +3 -3
@@ -123,8 +123,8 @@ static void mptcp_parse_option(const struct sk_buff *skb,break ;case MPTCPOPT_MP_JOIN : - mp_opt->suboptions |=OPTIONS_MPTCP_MPJ ;if (opsize ==TCPOLEN_MPTCP_MPJ_SYN ) { + mp_opt->suboptions |=OPTION_MPTCP_MPJ_SYN ; mp_opt->backup = *ptr++ &MPTCPOPT_BACKUP ; mp_opt->join_id = *ptr++; mp_opt->token =get_unaligned_be32 (ptr);
@@ -135,6 +135,7 @@ static void mptcp_parse_option(const struct sk_buff *skb, mp_opt->backup, mp_opt->join_id, mp_opt->token, mp_opt->nonce); }else if (opsize ==TCPOLEN_MPTCP_MPJ_SYNACK ) { + mp_opt->suboptions |=OPTION_MPTCP_MPJ_SYNACK ; mp_opt->backup = *ptr++ &MPTCPOPT_BACKUP ; mp_opt->join_id = *ptr++; mp_opt->thmac =get_unaligned_be64 (ptr);
@@ -145,11 +146,10 @@ static void mptcp_parse_option(const struct sk_buff *skb, mp_opt->backup, mp_opt->join_id, mp_opt->thmac, mp_opt->nonce); }else if (opsize ==TCPOLEN_MPTCP_MPJ_ACK ) { + mp_opt->suboptions |=OPTION_MPTCP_MPJ_ACK ; ptr +=2 ;memcpy (mp_opt->hmac, ptr,MPTCPOPT_HMAC_LEN );pr_debug ("MP_JOIN hmac" ); - }else { - mp_opt->suboptions &= ~OPTIONS_MPTCP_MPJ ; }break ;
Signature · 1 line
2.43.0.275.g3460e3d667-goog
Re: [PATCH net 1/5] mptcp: mptcp_parse_option() fix for MPTCPOPT_MP_JOIN
Quoted 8 lines · Eric Dumazet
mptcp_parse_option()currently setsOPTIONS_MPTCP_MPJ, for the three possible cases handled forMPTCPOPT_MP_JOINoption.
OPTIONS_MPTCP_MPJis the combination of three flags:
-OPTION_MPTCP_MPJ_SYN
-OPTION_MPTCP_MPJ_SYNACK
-OPTION_MPTCP_MPJ_ACK
Quoted 7 lines
This is a problem, because backup,
join_id, token, nonce and/or hmac fields could be left uninitialized in some cases.Distinguish the three cases, as following patches will need this step.
Fixes f296234c98a8 ("mptcp: Add handling of incoming MP_JOIN requests")Signed-off-by Eric Dumazet <[email protected]>
PATCH 2/5 mptcp: strict validation before using mp_opt->hmac
In reply to Eric Dumazetmp_opt->hmac contains uninitialized data unless OPTION_MPTCP_MPJ_ACK was set in mptcp_parse_option().
We must refine the condition before we call subflow_hmac_valid().
--- net/mptcp/subflow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/mptcp/subflow.c +1 -1
@@ -788,7 +788,7 @@ static struct sock *subflow_syn_recv_sock(const struct sock *sk, }else if (subflow_req->mp_join) {mptcp_get_options (skb, &mp_opt); -if (!(mp_opt.suboptions &OPTIONS_MPTCP_MPJ ) || +if (!(mp_opt.suboptions &OPTION_MPTCP_MPJ_ACK ) || !subflow_hmac_valid (req, &mp_opt) || !mptcp_can_accept_new_subflow (subflow_req->msk)) {SUBFLOW_REQ_INC_STATS (req,MPTCP_MIB_JOINACKMAC );
Signature · 1 line
2.43.0.275.g3460e3d667-goog
Re: [PATCH net 2/5] mptcp: strict validation before using mp_opt->hmac
Quoted 7 lines · Eric Dumazet
mp_opt->hmaccontains uninitialized data unlessOPTION_MPTCP_MPJ_ACKwas set inmptcp_parse_option().We must refine the condition before we call
subflow_hmac_valid().Fixes f296234c98a8 ("mptcp: Add handling of incoming MP_JOIN requests")Signed-off-by Eric Dumazet <[email protected]>
PATCH 3/5 mptcp: use OPTION_MPTCP_MPJ_SYNACK in subflow_finish_connect()
In reply to Eric Dumazetsubflow_finish_connect() uses four fields (backup, join_id, thmac, none) that may contain garbage unless OPTION_MPTCP_MPJ_SYNACK has been set in mptcp_parse_option()
--- net/mptcp/subflow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/mptcp/subflow.c +1 -1
@@ -506,7 +506,7 @@ static void subflow_finish_connect(struct sock *sk, const struct sk_buff *skb) }else if (subflow->request_join) {u8 hmac[SHA256_DIGEST_SIZE ]; -if (!(mp_opt.suboptions &OPTIONS_MPTCP_MPJ )) { +if (!(mp_opt.suboptions &OPTION_MPTCP_MPJ_SYNACK )) { subflow->reset_reason =MPTCP_RST_EMPTCP ; goto do_reset; }
Signature · 1 line
2.43.0.275.g3460e3d667-goog
Re: [PATCH net 3/5] mptcp: use OPTION_MPTCP_MPJ_SYNACK in subflow_finish_connect()
Quoted 6 lines · Eric Dumazet
subflow_finish_connect()uses four fields (backup,join_id, thmac, none) that may contain garbage unlessOPTION_MPTCP_MPJ_SYNACKhas been set inmptcp_parse_option()Fixes f296234c98a8 ("mptcp: Add handling of incoming MP_JOIN requests")Signed-off-by Eric Dumazet <[email protected]>
PATCH 4/5 mptcp: use OPTION_MPTCP_MPJ_SYN in subflow_check_req()
In reply to Eric Dumazetsyzbot reported that subflow_check_req() was using uninitialized data in subflow_check_req() [1]
This is because mp_opt.token is only set when OPTION_MPTCP_MPJ_SYN is also set.
While we are are it, fix mptcp_subflow_init_cookie_req() to test for OPTION_MPTCP_MPJ_ACK.
[1]
BUG: KMSAN: uninit-value in subflow_token_join_request net/mptcp/subflow.c:91 [inline] BUG: KMSAN: uninit-value in subflow_check_req+0x1028/0x15d0 net/mptcp/subflow.c:209 subflow_token_join_request net/mptcp/subflow.c:91 [inline] subflow_check_req+0x1028/0x15d0 net/mptcp/subflow.c:209 subflow_v6_route_req+0x269/0x410 net/mptcp/subflow.c:367 tcp_conn_request+0x153a/0x4240 net/ipv4/tcp_input.c:7164 subflow_v6_conn_request+0x3ee/0x510 tcp_rcv_state_process+0x2e1/0x4ac0 net/ipv4/tcp_input.c:6659 tcp_v6_do_rcv+0x11bf/0x1fe0 net/ipv6/tcp_ipv6.c:1669 tcp_v6_rcv+0x480b/0x4fb0 net/ipv6/tcp_ipv6.c:1900 ip6_protocol_deliver_rcu+0xda6/0x2a60 net/ipv6/ip6_input.c:438 ip6_input_finish net/ipv6/ip6_input.c:483 [inline] NF_HOOK include/linux/netfilter.h:314 [inline] ip6_input+0x15d/0x430 net/ipv6/ip6_input.c:492 dst_input include/net/dst.h:461 [inline] ip6_rcv_finish+0x5db/0x870 net/ipv6/ip6_input.c:79 NF_HOOK include/linux/netfilter.h:314 [inline] ipv6_rcv+0xda/0x390 net/ipv6/ip6_input.c:310 __netif_receive_skb_one_core net/core/dev.c:5532 [inline] __netif_receive_skb+0x1a6/0x5a0 net/core/dev.c:5646 netif_receive_skb_internal net/core/dev.c:5732 [inline] netif_receive_skb+0x58/0x660 net/core/dev.c:5791 tun_rx_batched+0x3ee/0x980 drivers/net/tun.c:1555 tun_get_user+0x53af/0x66d0 drivers/net/tun.c:2002 tun_chr_write_iter+0x3af/0x5d0 drivers/net/tun.c:2048 call_write_iter include/linux/fs.h:2020 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x8ef/0x1490 fs/read_write.c:584 ksys_write+0x20f/0x4c0 fs/read_write.c:637 __do_sys_write fs/read_write.c:649 [inline] __se_sys_write fs/read_write.c:646 [inline] __x64_sys_write+0x93/0xd0 fs/read_write.c:646 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x44/0x110 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x63/0x6b
Local variable mp_opt created at:
subflow_check_req+0x6d/0x15d0 net/mptcp/subflow.c:145 subflow_v6_route_req+0x269/0x410 net/mptcp/subflow.c:367 CPU: 1 PID: 5924 Comm: syz-executor.3 Not tainted 6.7.0-rc8-syzkaller-00055-g5eff55d725a4 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023
--- net/mptcp/subflow.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
net/mptcp/subflow.c +2 -2
@@ -158,7 +158,7 @@ static int subflow_check_req(struct request_sock *req,mptcp_get_options (skb, &mp_opt); opt_mp_capable = !!(mp_opt.suboptions &OPTIONS_MPTCP_MPC ); - opt_mp_join = !!(mp_opt.suboptions &OPTIONS_MPTCP_MPJ ); + opt_mp_join = !!(mp_opt.suboptions &OPTION_MPTCP_MPJ_SYN );if (opt_mp_capable) {SUBFLOW_REQ_INC_STATS (req,MPTCP_MIB_MPCAPABLEPASSIVE );
@@ -255,7 +255,7 @@ int mptcp_subflow_init_cookie_req(struct request_sock *req,mptcp_get_options (skb, &mp_opt); opt_mp_capable = !!(mp_opt.suboptions &OPTIONS_MPTCP_MPC ); - opt_mp_join = !!(mp_opt.suboptions &OPTIONS_MPTCP_MPJ ); + opt_mp_join = !!(mp_opt.suboptions &OPTION_MPTCP_MPJ_ACK );if (opt_mp_capable && opt_mp_join)return -EINVAL ;
Signature · 1 line
2.43.0.275.g3460e3d667-goog
Re: [PATCH net 4/5] mptcp: use OPTION_MPTCP_MPJ_SYN in subflow_check_req()
Quoted 53 lines · Eric Dumazet
syzbot reported that
subflow_check_req()was using uninitialized data insubflow_check_req()[1]This is because mp_opt.token is only set when
OPTION_MPTCP_MPJ_SYNis also set.While we are are it, fix
mptcp_subflow_init_cookie_req()to test forOPTION_MPTCP_MPJ_ACK.[1]
BUG: KMSAN: uninit-value in subflow_token_join_request net/mptcp/subflow.c:91 [inline] BUG: KMSAN: uninit-value in subflow_check_req+0x1028/0x15d0 net/mptcp/subflow.c:209 subflow_token_join_request net/mptcp/subflow.c:91 [inline] subflow_check_req+0x1028/0x15d0 net/mptcp/subflow.c:209 subflow_v6_route_req+0x269/0x410 net/mptcp/subflow.c:367 tcp_conn_request+0x153a/0x4240 net/ipv4/tcp_input.c:7164 subflow_v6_conn_request+0x3ee/0x510 tcp_rcv_state_process+0x2e1/0x4ac0 net/ipv4/tcp_input.c:6659 tcp_v6_do_rcv+0x11bf/0x1fe0 net/ipv6/tcp_ipv6.c:1669 tcp_v6_rcv+0x480b/0x4fb0 net/ipv6/tcp_ipv6.c:1900 ip6_protocol_deliver_rcu+0xda6/0x2a60 net/ipv6/ip6_input.c:438 ip6_input_finish net/ipv6/ip6_input.c:483 [inline] NF_HOOK include/linux/netfilter.h:314 [inline] ip6_input+0x15d/0x430 net/ipv6/ip6_input.c:492 dst_input include/net/dst.h:461 [inline] ip6_rcv_finish+0x5db/0x870 net/ipv6/ip6_input.c:79 NF_HOOK include/linux/netfilter.h:314 [inline] ipv6_rcv+0xda/0x390 net/ipv6/ip6_input.c:310 __netif_receive_skb_one_core net/core/dev.c:5532 [inline] __netif_receive_skb+0x1a6/0x5a0 net/core/dev.c:5646 netif_receive_skb_internal net/core/dev.c:5732 [inline] netif_receive_skb+0x58/0x660 net/core/dev.c:5791 tun_rx_batched+0x3ee/0x980 drivers/net/tun.c:1555 tun_get_user+0x53af/0x66d0 drivers/net/tun.c:2002 tun_chr_write_iter+0x3af/0x5d0 drivers/net/tun.c:2048 call_write_iter include/linux/fs.h:2020 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x8ef/0x1490 fs/read_write.c:584 ksys_write+0x20f/0x4c0 fs/read_write.c:637 __do_sys_write fs/read_write.c:649 [inline] __se_sys_write fs/read_write.c:646 [inline] __x64_sys_write+0x93/0xd0 fs/read_write.c:646 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x44/0x110 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x63/0x6bLocal variable
mp_optcreated at:subflow_check_req+0x6d/0x15d0 net/mptcp/subflow.c:145 subflow_v6_route_req+0x269/0x410 net/mptcp/subflow.c:367 CPU: 1 PID: 5924 Comm: syz-executor.3 Not tainted 6.7.0-rc8-syzkaller-00055-g5eff55d725a4 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023
Quoted 3 lines
Fixes f296234c98a8 ("mptcp: Add handling of incoming MP_JOIN requests")Reported-by syzbot <[email protected]>Signed-off-by Eric Dumazet <[email protected]>
PATCH 5/5 mptcp: refine opt_mp_capable determination
In reply to Eric DumazetOPTIONS_MPTCP_MPC is a combination of three flags.
It would be better to be strict about testing what flag is expected, at least for code readability.
mptcp_parse_option() already makes the distinction.
- subflow_check_req() should use OPTION_MPTCP_MPC_SYN.
- mptcp_subflow_init_cookie_req() should use OPTION_MPTCP_MPC_ACK.
- subflow_finish_connect() should use OPTION_MPTCP_MPC_SYNACK
- subflow_syn_recv_sock should use OPTION_MPTCP_MPC_ACK
--- net/mptcp/subflow.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
net/mptcp/subflow.c +4 -4
@@ -157,7 +157,7 @@ static int subflow_check_req(struct request_sock *req,mptcp_get_options (skb, &mp_opt); - opt_mp_capable = !!(mp_opt.suboptions &OPTIONS_MPTCP_MPC ); + opt_mp_capable = !!(mp_opt.suboptions &OPTION_MPTCP_MPC_SYN ); opt_mp_join = !!(mp_opt.suboptions &OPTION_MPTCP_MPJ_SYN );if (opt_mp_capable) {SUBFLOW_REQ_INC_STATS (req,MPTCP_MIB_MPCAPABLEPASSIVE );
@@ -254,7 +254,7 @@ int mptcp_subflow_init_cookie_req(struct request_sock *req,subflow_init_req (req, sk_listener);mptcp_get_options (skb, &mp_opt); - opt_mp_capable = !!(mp_opt.suboptions &OPTIONS_MPTCP_MPC ); + opt_mp_capable = !!(mp_opt.suboptions &OPTION_MPTCP_MPC_ACK ); opt_mp_join = !!(mp_opt.suboptions &OPTION_MPTCP_MPJ_ACK );if (opt_mp_capable && opt_mp_join)return -EINVAL ;
@@ -486,7 +486,7 @@ static void subflow_finish_connect(struct sock *sk, const struct sk_buff *skb)mptcp_get_options (skb, &mp_opt);if (subflow->request_mptcp) { -if (!(mp_opt.suboptions &OPTIONS_MPTCP_MPC )) { +if (!(mp_opt.suboptions &OPTION_MPTCP_MPC_SYNACK )) {MPTCP_INC_STATS (sock_net (sk),MPTCP_MIB_MPCAPABLEACTIVEFALLBACK );mptcp_do_fallback (sk);
@@ -783,7 +783,7 @@ static struct sock *subflow_syn_recv_sock(const struct sock *sk,* options. */ mptcp_get_options (skb, &mp_opt); -if (!(mp_opt.suboptions &OPTIONS_MPTCP_MPC )) +if (!(mp_opt.suboptions &OPTION_MPTCP_MPC_ACK )) fallback = true; }else if (subflow_req->mp_join) {
Signature · 1 line
2.43.0.275.g3460e3d667-goog
Mat Martineau
maintainerRe: [PATCH net 5/5] mptcp: refine opt_mp_capable determination
Quoted 7 lines · Eric Dumazet
OPTIONS_MPTCP_MPCis a combination of three flags.It would be better to be strict about testing what flag is expected, at least for code readability.
mptcp_parse_option()already makes the distinction.
Quoted 8 lines
-
subflow_check_req()should useOPTION_MPTCP_MPC_SYN.-
mptcp_subflow_init_cookie_req()should useOPTION_MPTCP_MPC_ACK.-
subflow_finish_connect()should useOPTION_MPTCP_MPC_SYNACK-
subflow_syn_recv_sockshould useOPTION_MPTCP_MPC_ACK
Should this be applied to net-next?
If intended for -net, I think
is the appropriate commit to reference.
- Mat
Quoted 50 lines
Suggested-by Paolo Abeni <[email protected]>Signed-off-by Eric Dumazet <[email protected]>---
net/mptcp/subflow.c| 8 ++++----1 file changed, 4 insertions(+), 4 deletions(-)net/mptcp/subflow.c +4
-4@@ -157,7 +157,7 @@ static int subflow_check_req(struct request_sock *req,mptcp_get_options (skb, &mp_opt); - opt_mp_capable = !!(mp_opt.suboptions &OPTIONS_MPTCP_MPC ); + opt_mp_capable = !!(mp_opt.suboptions &OPTION_MPTCP_MPC_SYN ); opt_mp_join = !!(mp_opt.suboptions &OPTION_MPTCP_MPJ_SYN );if (opt_mp_capable) {SUBFLOW_REQ_INC_STATS (req,MPTCP_MIB_MPCAPABLEPASSIVE );@@ -254,7 +254,7 @@ int mptcp_subflow_init_cookie_req(struct request_sock *req,subflow_init_req (req, sk_listener);mptcp_get_options (skb, &mp_opt); - opt_mp_capable = !!(mp_opt.suboptions &OPTIONS_MPTCP_MPC ); + opt_mp_capable = !!(mp_opt.suboptions &OPTION_MPTCP_MPC_ACK ); opt_mp_join = !!(mp_opt.suboptions &OPTION_MPTCP_MPJ_ACK );if (opt_mp_capable && opt_mp_join)return -EINVAL ;@@ -486,7 +486,7 @@ static void subflow_finish_connect(struct sock *sk, const struct sk_buff *skb)mptcp_get_options (skb, &mp_opt);if (subflow->request_mptcp) { -if (!(mp_opt.suboptions &OPTIONS_MPTCP_MPC )) { +if (!(mp_opt.suboptions &OPTION_MPTCP_MPC_SYNACK )) {MPTCP_INC_STATS (sock_net (sk),MPTCP_MIB_MPCAPABLEACTIVEFALLBACK );mptcp_do_fallback (sk);@@ -783,7 +783,7 @@ static struct sock *subflow_syn_recv_sock(const struct sock *sk,* options. */ mptcp_get_options (skb, &mp_opt); -if (!(mp_opt.suboptions &OPTIONS_MPTCP_MPC )) +if (!(mp_opt.suboptions &OPTION_MPTCP_MPC_ACK )) fallback = true; }else if (subflow_req->mp_join) {Signature · 1 line
2.43.0.275.g3460e3d667-goog
Re: [PATCH net 5/5] mptcp: refine opt_mp_capable determination
In reply to Eric DumazetQuoted 9 lines · Eric Dumazet
OPTIONS_MPTCP_MPCis a combination of three flags.It would be better to be strict about testing what flag is expected, at least for code readability.
mptcp_parse_option()already makes the distinction.-
subflow_check_req()should useOPTION_MPTCP_MPC_SYN.
Quoted 8 lines
-
mptcp_subflow_init_cookie_req()should useOPTION_MPTCP_MPC_ACK.-
subflow_finish_connect()should useOPTION_MPTCP_MPC_SYNACK-
subflow_syn_recv_sockshould useOPTION_MPTCP_MPC_ACKSuggested-by Paolo Abeni <[email protected]>Signed-off-by Eric Dumazet <[email protected]>
Quoted 20 lines · Eric Dumazet
Based on a syzbot report (see 4th patch in the series).
We need to be more explicit about which one of the following flag is set by
mptcp_parse_option():-
OPTION_MPTCP_MPJ_SYN
-OPTION_MPTCP_MPJ_SYNACK
-OPTION_MPTCP_MPJ_ACKThen select the appropriate values instead of
OPTIONS_MPTCP_MPJPaolo suggested to do the same for
OPTIONS_MPTCP_MPC(5th patch)Eric Dumazet (5):
mptcp:mptcp_parse_option()fix forMPTCPOPT_MP_JOIN
mptcp: strict validation before usingmp_opt->hmac
mptcp: useOPTION_MPTCP_MPJ_SYNACKinsubflow_finish_connect()
mptcp: useOPTION_MPTCP_MPJ_SYNinsubflow_check_req()
mptcp: refineopt_mp_capabledetermination
Quoted 3 lines
net/mptcp/options.c | 6 +++--- net/mptcp/subflow.c | 16 ++++++++-------- 2 files changed, 11 insertions(+), 11 deletions(-)
The patches LGTM, thanks Eric!
I gave a spin into the mptcp self-tests and pktdrill and both suite are happy.
Quoted 20 lines · Eric Dumazet
Based on a syzbot report (see 4th patch in the series).
We need to be more explicit about which one of the following flag is set by
mptcp_parse_option():-
OPTION_MPTCP_MPJ_SYN
-OPTION_MPTCP_MPJ_SYNACK
-OPTION_MPTCP_MPJ_ACKThen select the appropriate values instead of
OPTIONS_MPTCP_MPJPaolo suggested to do the same for
OPTIONS_MPTCP_MPC(5th patch)Eric Dumazet (5):
mptcp:mptcp_parse_option()fix forMPTCPOPT_MP_JOIN
mptcp: strict validation before usingmp_opt->hmac
mptcp: useOPTION_MPTCP_MPJ_SYNACKinsubflow_finish_connect()
mptcp: useOPTION_MPTCP_MPJ_SYNinsubflow_check_req()
mptcp: refineopt_mp_capabledetermination
Quoted 3 lines
net/mptcp/options.c| 6 +++---net/mptcp/subflow.c| 16 ++++++++--------2 files changed, 11 insertions(+), 11 deletions(-)
Hi Eric -
Thanks for the fixes, code looks good (one separate commit message comment on patch 5):
This series was applied to netdev/net.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This series was applied to netdev/net.git (main)
by Jakub Kicinski <[email protected]>:
Quoted 10 lines · On Thu, 11 Jan 2024 19:49:12 +0000 you wrote:
Based on a syzbot report (see 4th patch in the series).
We need to be more explicit about which one of the following flag is set by
mptcp_parse_option():-
OPTION_MPTCP_MPJ_SYN
-OPTION_MPTCP_MPJ_SYNACK
-OPTION_MPTCP_MPJ_ACK[...]
Here is the summary with links:
- [net,1/5] mptcp: mptcp_parse_option() fix for MPTCPOPT_MP_JOIN
https://git.kernel.org/netdev/net/c/89e23277f9c1 - [net,2/5] mptcp: strict validation before using mp_opt->hmac https://git.kernel.org/netdev/net/c/c1665273bdc7 - [net,3/5] mptcp: use OPTION_MPTCP_MPJ_SYNACK in subflow_finish_connect() https://git.kernel.org/netdev/net/c/be1d9d9d38da - [net,4/5] mptcp: use OPTION_MPTCP_MPJ_SYN in subflow_check_req() https://git.kernel.org/netdev/net/c/66ff70df1a91 - [net,5/5] mptcp: refine opt_mp_capable determination https://git.kernel.org/netdev/net/c/724b00c12957
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html