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:	Fri, 10 Oct 2014 15:34:21 -0400 (EDT)
From:	David Miller <davem@...emloft.net>
To:	alexander.duyck@...il.com
Cc:	netdev@...r.kernel.org, eric.dumazet@...il.com
Subject: Re: [PATCH v4] flow-dissector: Fix alignment issue in
 __skb_flow_get_ports

From: alexander.duyck@...il.com
Date: Fri, 10 Oct 2014 12:09:12 -0700

> From: Alexander Duyck <alexander.h.duyck@...hat.com>
> 
> This patch addresses a kernel unaligned access bug seen on a sparc64 system
> with an igb adapter.  Specifically the __skb_flow_get_ports was returning a
> be32 pointer which was then having the value directly returned.
> 
> In order to prevent this it is actually easier to simply not populate the
> ports or address values when an skb is not present.  In this case the
> assumption is that the data isn't needed and rather than slow down the
> faster aligned accesses by making them have to assume the unaligned path on
> architectures that don't support efficent unaligned access it makes more
> sense to simply switch off the bits that were copying the source and
> destination address/port for the case where we only care about the protocol
> types and lengths which are normally 16 bit fields anyway.
> 
> Reported-by: David S. Miller <davem@...emloft.net>
> Signed-off-by: Alexander Duyck <alexander.h.duyck@...hat.com>
> ---
> 
> v2: Fixed alignment to __be16 on ports
> v3: Discarded previous approach and instead simplified things by
>     not populating ports, or src/dst addresses if skb is not present.
>     By doing this we avoid the unaligned access issue entirely and do not
>     populate fields that will not be used by the eth_get_headlen function.
> v4: Minor whitespace cleanups
>     Added workaround for access of doff resulting in unaligned access

Applied, thanks Alex.
--
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