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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 03 Sep 2010 12:55:33 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	paul.gortmaker@...driver.com
Cc:	netdev@...r.kernel.org, allan.stephens@...driver.com
Subject: Re: [PATCH net-next 3/4] tipc: Optimize handling excess content on
 incoming messages

From: Paul Gortmaker <paul.gortmaker@...driver.com>
Date: Fri,  3 Sep 2010 14:33:41 -0400

> @@ -248,6 +248,7 @@ void tipc_net_route_msg(struct sk_buff *buf)
>  
>  	/* Handle message for another node */
>  	msg_dbg(msg, "NET>SEND>: ");
> +	pskb_trim(buf, msg_size(msg));
>  	tipc_link_send(buf, dnode, msg_link_selector(msg));
>  }

1) pskb_trim() can fail, you need to check the return value
   and act appropriately.

2) pskb_trim() can change all of the packet data pointers, so
   after you call it you need to reload any pointers to the
   packet data area.  At a minimum, you woull need to
   reload 'msg' in this code snippet.

   Otherwise 'msg' can point to freed up memory after the call.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ