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:	Tue, 31 May 2011 15:13:21 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	cmetcalf@...era.com
Cc:	netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
	kaber@...sh.net
Subject: Re: [PATCH] ip_options_compile: properly handle unaligned pointer

From: Chris Metcalf <cmetcalf@...era.com>
Date: Sun, 29 May 2011 16:55:44 -0400

> The current code takes an unaligned pointer and does htonl() on it to
> make it big-endian, then does a memcpy().  The problem is that the
> compiler decides that since the pointer is to a __be32, it is legal
> to optimize the copy into a processor word store.  However, on an
> architecture that does not handled unaligned writes in kernel space,
> this produces an unaligned exception fault.
> 
> The solution is to track the pointer as a "char *" (which removes a bunch
> of unpleasant casts in any case), and then just use put_unaligned_be32()
> to write the value to memory.
> 
> Signed-off-by: Chris Metcalf <cmetcalf@...era.com>

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