diff mbox series

mptcp: fix uninit-value in mptcp_incoming_options

Message ID tencent_B0E02F1D6C009450E8D6EC06CC6C7B5E6C0A@qq.com (mailing list archive)
State Accepted
Commit 237ff253f2d4f6307b7b20434d7cbcc67693298b
Delegated to: Netdev Maintainers
Headers show
Series mptcp: fix uninit-value in mptcp_incoming_options | expand

Checks

Context Check Description
netdev/series_format warning Single patches do not need cover letters; Target tree name not specified in the subject
netdev/codegen success Generated files up to date
netdev/tree_selection success Guessed tree name to be net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 1129 this patch: 1129
netdev/cc_maintainers success CCed 7 of 7 maintainers
netdev/build_clang success Errors and warnings before: 1155 this patch: 1155
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 1156 this patch: 1156
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 7 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Edward Adam Davis Nov. 23, 2023, 1:23 a.m. UTC
Added initialization use_ack to mptcp_parse_option().

Reported-by: syzbot+b834a6b2decad004cfa1@syzkaller.appspotmail.com
Signed-off-by: Edward Adam Davis <eadavis@qq.com>
---
 net/mptcp/options.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Paolo Abeni Nov. 23, 2023, 4:41 p.m. UTC | #1
On Thu, 2023-11-23 at 09:23 +0800, Edward Adam Davis wrote:
> Added initialization use_ack to mptcp_parse_option().
> 
> Reported-by: syzbot+b834a6b2decad004cfa1@syzkaller.appspotmail.com
> Signed-off-by: Edward Adam Davis <eadavis@qq.com>
> ---
>  net/mptcp/options.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/net/mptcp/options.c b/net/mptcp/options.c
> index cd15ec73073e..c53914012d01 100644
> --- a/net/mptcp/options.c
> +++ b/net/mptcp/options.c
> @@ -108,6 +108,7 @@ static void mptcp_parse_option(const struct sk_buff *skb,
>  			mp_opt->suboptions |= OPTION_MPTCP_DSS;
>  			mp_opt->use_map = 1;
>  			mp_opt->mpc_map = 1;
> +			mp_opt->use_ack = 0;
>  			mp_opt->data_len = get_unaligned_be16(ptr);
>  			ptr += 2;
>  		}

LGTM, and syzbot tested it.

Acked-by: Paolo Abeni <pabeni@redhat.com>

@Edward: for future similar patches, please add also the tested tag
from syzbot, will make tracking easier.

Thanks!

Paolo
Edward Adam Davis Nov. 24, 2023, 11:05 a.m. UTC | #2
On Thu, 23 Nov 2023 17:41:31 +0100, Paolo Abeni wrote:
> > Added initialization use_ack to mptcp_parse_option().
> >
> > Reported-by: syzbot+b834a6b2decad004cfa1@syzkaller.appspotmail.com
> > Signed-off-by: Edward Adam Davis <eadavis@qq.com>
> > ---
> >  net/mptcp/options.c | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/net/mptcp/options.c b/net/mptcp/options.c
> > index cd15ec73073e..c53914012d01 100644
> > --- a/net/mptcp/options.c
> > +++ b/net/mptcp/options.c
> > @@ -108,6 +108,7 @@ static void mptcp_parse_option(const struct sk_buff *skb,
> >  			mp_opt->suboptions |= OPTION_MPTCP_DSS;
> >  			mp_opt->use_map = 1;
> >  			mp_opt->mpc_map = 1;
> > +			mp_opt->use_ack = 0;
> >  			mp_opt->data_len = get_unaligned_be16(ptr);
> >  			ptr += 2;
> >  		}
> 
> LGTM, and syzbot tested it.
> 
> Acked-by: Paolo Abeni <pabeni@redhat.com>
> 
> @Edward: for future similar patches, please add also the tested tag
> from syzbot, will make tracking easier.
OK, I will.

Edward
patchwork-bot+netdevbpf@kernel.org Nov. 24, 2023, 3 p.m. UTC | #3
Hello:

This patch was applied to netdev/net.git (main)
by David S. Miller <davem@davemloft.net>:

On Thu, 23 Nov 2023 09:23:39 +0800 you wrote:
> Added initialization use_ack to mptcp_parse_option().
> 
> Reported-by: syzbot+b834a6b2decad004cfa1@syzkaller.appspotmail.com
> Signed-off-by: Edward Adam Davis <eadavis@qq.com>
> ---
>  net/mptcp/options.c | 1 +
>  1 file changed, 1 insertion(+)

Here is the summary with links:
  - mptcp: fix uninit-value in mptcp_incoming_options
    https://git.kernel.org/netdev/net/c/237ff253f2d4

You are awesome, thank you!
diff mbox series

Patch

diff --git a/net/mptcp/options.c b/net/mptcp/options.c
index cd15ec73073e..c53914012d01 100644
--- a/net/mptcp/options.c
+++ b/net/mptcp/options.c
@@ -108,6 +108,7 @@  static void mptcp_parse_option(const struct sk_buff *skb,
 			mp_opt->suboptions |= OPTION_MPTCP_DSS;
 			mp_opt->use_map = 1;
 			mp_opt->mpc_map = 1;
+			mp_opt->use_ack = 0;
 			mp_opt->data_len = get_unaligned_be16(ptr);
 			ptr += 2;
 		}