lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 17 Jul 2023 12:04:54 -0700
From: Kuniyuki Iwashima <kuniyu@...zon.com>
To: <ruc_gongyuanjun@....com>
CC: <davem@...emloft.net>, <dsahern@...nel.org>, <netdev@...r.kernel.org>,
	Kuniyuki Iwashima <kuniyu@...zon.com>
Subject: [PATCH v2 1/1] net:ipv6: check return value of pskb_trim()

From: Yuanjun Gong <ruc_gongyuanjun@....com>
Date: Mon, 17 Jul 2023 22:45:19 +0800
> goto tx_err if an unexpected result is returned by pskb_tirm()
> in ip6erspan_tunnel_xmit().
> 
> Signed-off-by: Yuanjun Gong <ruc_gongyuanjun@....com>

Fixes: 5a963eb61b7c ("ip6_gre: Add ERSPAN native tunnel support")
Reviewed-by: Kuniyuki Iwashima <kuniyu@...zon.com>

Please keep these in mind for an acutual fix from next time.

  * Add Fixes: tag in changelog
  * Specify target tree as net in mail subject

See also Documentation/process/maintainer-netdev.rst

Thanks!


> ---
>  net/ipv6/ip6_gre.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/net/ipv6/ip6_gre.c b/net/ipv6/ip6_gre.c
> index da80974ad23a..070d87abf7c0 100644
> --- a/net/ipv6/ip6_gre.c
> +++ b/net/ipv6/ip6_gre.c
> @@ -955,7 +955,8 @@ static netdev_tx_t ip6erspan_tunnel_xmit(struct sk_buff *skb,
>  		goto tx_err;
>  
>  	if (skb->len > dev->mtu + dev->hard_header_len) {
> -		pskb_trim(skb, dev->mtu + dev->hard_header_len);
> +		if (pskb_trim(skb, dev->mtu + dev->hard_header_len))
> +			goto tx_err;
>  		truncate = true;
>  	}
>  
> -- 
> 2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ