Re: [PATCH] mptcp: fix uninit-value in mptcp_incoming_options
From: Paolo Abeni
Date: Thu Nov 23 2023 - 11:41:42 EST
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@xxxxxxxxxxxxxxxxxxxxxxxxx
> Signed-off-by: Edward Adam Davis <eadavis@xxxxxx>
> ---
> 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@xxxxxxxxxx>
@Edward: for future similar patches, please add also the tested tag
from syzbot, will make tracking easier.
Thanks!
Paolo