diff mbox series

[mptcp-net] mptcp: drop unconditional pr_warn on bad opt

Message ID a4a3c36230b2aeb1315c6234fa39f9ef711be759.1621358150.git.pabeni@redhat.com
State Accepted, archived
Headers show
Series [mptcp-net] mptcp: drop unconditional pr_warn on bad opt | expand

Commit Message

Paolo Abeni May 18, 2021, 5:15 p.m. UTC
This is a left-over of early day. A malicious peer can flood
the kernel logs with useless messages, just drop it.

Fixes: f296234c98a8 ("mptcp: Add handling of incoming MP_JOIN requests")
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
---
 net/mptcp/options.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Mat Martineau May 18, 2021, 9:43 p.m. UTC | #1
On Tue, 18 May 2021, Paolo Abeni wrote:

> This is a left-over of early day. A malicious peer can flood
> the kernel logs with useless messages, just drop it.
>
> Fixes: f296234c98a8 ("mptcp: Add handling of incoming MP_JOIN requests")
> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
> ---
> net/mptcp/options.c | 1 -
> 1 file changed, 1 deletion(-)

Thanks for catching this Paolo, looks good.

Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com>


>
> diff --git a/net/mptcp/options.c b/net/mptcp/options.c
> index b713828819b6..f5daccaaac99 100644
> --- a/net/mptcp/options.c
> +++ b/net/mptcp/options.c
> @@ -141,7 +141,6 @@ static void mptcp_parse_option(const struct sk_buff *skb,
> 			memcpy(mp_opt->hmac, ptr, MPTCPOPT_HMAC_LEN);
> 			pr_debug("MP_JOIN hmac");
> 		} else {
> -			pr_warn("MP_JOIN bad option size");
> 			mp_opt->mp_join = 0;
> 		}
> 		break;
> -- 
> 2.26.3

--
Mat Martineau
Intel
Matthieu Baerts May 20, 2021, 6:32 p.m. UTC | #2
Hi Paolo, Mat,

On 18/05/2021 19:15, Paolo Abeni wrote:
> This is a left-over of early day. A malicious peer can flood
> the kernel logs with useless messages, just drop it.
> 
> Fixes: f296234c98a8 ("mptcp: Add handling of incoming MP_JOIN requests")
> Signed-off-by: Paolo Abeni <pabeni@redhat.com>

Thank you for the patch and the review:

- 1cb1f9c4c940: mptcp: drop unconditional pr_warn on bad opt
- Results: bdf8ab2fa53b..f7c7d5a50852

Builds and tests are now in progress:

https://cirrus-ci.com/github/multipath-tcp/mptcp_net-next/export/20210520T183134
https://github.com/multipath-tcp/mptcp_net-next/actions/workflows/build-validation.yml?query=branch:export/20210520T183134

Cheers,
Matt
diff mbox series

Patch

diff --git a/net/mptcp/options.c b/net/mptcp/options.c
index b713828819b6..f5daccaaac99 100644
--- a/net/mptcp/options.c
+++ b/net/mptcp/options.c
@@ -141,7 +141,6 @@  static void mptcp_parse_option(const struct sk_buff *skb,
 			memcpy(mp_opt->hmac, ptr, MPTCPOPT_HMAC_LEN);
 			pr_debug("MP_JOIN hmac");
 		} else {
-			pr_warn("MP_JOIN bad option size");
 			mp_opt->mp_join = 0;
 		}
 		break;