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] [day] [month] [year] [list]
Date:	Wed, 21 May 2014 10:41:57 -0700
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Alexander Duyck <alexander.h.duyck@...el.com>
Cc:	Alexander Duyck <alexander.duyck@...il.com>,
	David Miller <davem@...emloft.net>, amirv@...lanox.com,
	netdev@...r.kernel.org, idos@...lanox.com,
	jeffrey.t.kirsher@...el.com, jesse.brandeburg@...el.com,
	bruce.w.allan@...el.com, carolyn.wyborny@...el.com,
	donald.c.skidmore@...el.com, gregory.v.rose@...el.com,
	john.ronciak@...el.com, mitch.a.williams@...el.com,
	yevgenyp@...lanox.com, ogerlitz@...lanox.com
Subject: Re: [PATCH net-next 1/2] net: Expose header length compution
 function

On Wed, 2014-05-21 at 09:45 -0700, Alexander Duyck wrote:

> We have had stack smashing issues in the past with the ixgbe interrupt
> handlers and it wasn't consuming much memory on the stack as I recall. 
> I prefer to err on the side of caution.

Well, if we can not temporarily use 256 bytes in a leaf function in rx
handler of a driver, how IP + TCP stack will ever work ?

> Also the more I think about it I am not really comfortable putting a
> partially initialized sk_buff through any function calls.  It seems like
> it is setting somebody up for a failure because if at some point the
> code changes and needs some other field out of the skb it won't be
> initialized here unless they catch this tricky bit of code.

We are speaking of flow_dissect, which is a leaf function if 
data_len = 0

The fields I setup are the only ones that can be read from flow
dissection.

We look at a frame, given a starting point (network header) and protocol
(skb->protocol).

Apparent complexity is apparent only : skb_header_pointer() is basically
a nop if data_len = 0

Sure, you can add a

#ifdef DEBUG_FLOW_DISSECT
   memset(&skb, 0x6b, sizeof(skb));
#endif

And I did/tried that before sending the patch ;)



--
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