mbox series

[PATCHv3,net,0/3] tipc: fix the mtu update in link mtu negotiation

Message ID cover.1684093873.git.lucien.xin@gmail.com (mailing list archive)
Headers show
Series tipc: fix the mtu update in link mtu negotiation | expand

Message

Xin Long May 14, 2023, 7:52 p.m. UTC
This patchset fixes a crash caused by a too small MTU carried in the
activate msg. Note that as such malicious packet does not exist in
the normal env, the fix won't break any application

The 1st patch introduces a function to calculate the minimum MTU for
the bearer, and the 2nd patch fixes the crash with this helper. While
at it, the 3rd patch fixes the udp bearer mtu update by netlink with
this helper.

Xin Long (3):
  tipc: add tipc_bearer_min_mtu to calculate min mtu
  tipc: do not update mtu if msg_max is too small in mtu negotiation
  tipc: check the bearer min mtu properly when setting it by netlink

 net/tipc/bearer.c    | 17 +++++++++++++++--
 net/tipc/bearer.h    |  3 +++
 net/tipc/link.c      |  9 ++++++---
 net/tipc/udp_media.c |  5 +++--
 4 files changed, 27 insertions(+), 7 deletions(-)

Comments

Tung Quang Nguyen May 15, 2023, 2:41 a.m. UTC | #1
>Subject: [PATCHv3 net 0/3] tipc: fix the mtu update in link mtu negotiation
>
>This patchset fixes a crash caused by a too small MTU carried in the
>activate msg. Note that as such malicious packet does not exist in
>the normal env, the fix won't break any application
>
>The 1st patch introduces a function to calculate the minimum MTU for
>the bearer, and the 2nd patch fixes the crash with this helper. While
>at it, the 3rd patch fixes the udp bearer mtu update by netlink with
>this helper.
>
>Xin Long (3):
>  tipc: add tipc_bearer_min_mtu to calculate min mtu
>  tipc: do not update mtu if msg_max is too small in mtu negotiation
>  tipc: check the bearer min mtu properly when setting it by netlink
>
> net/tipc/bearer.c    | 17 +++++++++++++++--
> net/tipc/bearer.h    |  3 +++
> net/tipc/link.c      |  9 ++++++---
> net/tipc/udp_media.c |  5 +++--
> 4 files changed, 27 insertions(+), 7 deletions(-)
>
>--
>2.39.1
For the whole series:
Reviewed-by: Tung Nguyen <tung.q.nguyen@dektech.com.au>
patchwork-bot+netdevbpf@kernel.org May 15, 2023, 9:30 a.m. UTC | #2
Hello:

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

On Sun, 14 May 2023 15:52:26 -0400 you wrote:
> This patchset fixes a crash caused by a too small MTU carried in the
> activate msg. Note that as such malicious packet does not exist in
> the normal env, the fix won't break any application
> 
> The 1st patch introduces a function to calculate the minimum MTU for
> the bearer, and the 2nd patch fixes the crash with this helper. While
> at it, the 3rd patch fixes the udp bearer mtu update by netlink with
> this helper.
> 
> [...]

Here is the summary with links:
  - [PATCHv3,net,1/3] tipc: add tipc_bearer_min_mtu to calculate min mtu
    https://git.kernel.org/netdev/net/c/3ae6d66b605b
  - [PATCHv3,net,2/3] tipc: do not update mtu if msg_max is too small in mtu negotiation
    https://git.kernel.org/netdev/net/c/56077b56cd3f
  - [PATCHv3,net,3/3] tipc: check the bearer min mtu properly when setting it by netlink
    https://git.kernel.org/netdev/net/c/35a089b5d793

You are awesome, thank you!