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, 13 Apr 2007 16:35:21 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	drraid@...il.com
Cc:	linux-kernel@...r.kernel.org, kaber@...sh.net
Subject: Re: Kernel 2.6.20.4 Unaligned address

From: "doctor raid" <drraid@...il.com>
Date: Tue, 10 Apr 2007 16:02:01 -0700

> [1] kernel errors reporting unaligned access of memory
> [2]  The following two lines iterate twice a piece, about once every 2 minutes:
> 
>       Kernel unaligned access at TPC[79c344] arpt_do_table+0x3cc/0x640
>        Kernel unaligned access at TPC[79c33c] arpt_do_table+0x3c4/0x640

This patch below should fix this problem.

Patrick I'm going to push this to Linus.  Even if it doesn't
fix this person's problem, either both the input device loop
and the output device loop should use the "long" casting
optimization or both should not :-)

Signed-off-by: David S. Miller <davem@...emloft.net>

diff --git a/net/ipv4/netfilter/arp_tables.c b/net/ipv4/netfilter/arp_tables.c
index 5170f5c..57b0221 100644
--- a/net/ipv4/netfilter/arp_tables.c
+++ b/net/ipv4/netfilter/arp_tables.c
@@ -166,13 +166,9 @@ static inline int arp_packet_match(const struct arphdr *arphdr,
 		return 0;
 	}
 
-	for (i = 0, ret = 0; i < IFNAMSIZ/sizeof(unsigned long); i++) {
-		unsigned long odev;
-		memcpy(&odev, outdev + i*sizeof(unsigned long),
-		       sizeof(unsigned long));
-		ret |= (odev
-			^ ((const unsigned long *)arpinfo->outiface)[i])
-			& ((const unsigned long *)arpinfo->outiface_mask)[i];
+	for (i = 0, ret = 0; i < IFNAMSIZ; i++) {
+		ret |= (outdev[i] ^ arpinfo->outiface[i])
+			& arpinfo->outiface_mask[i];
 	}
 
 	if (FWINV(ret != 0, ARPT_INV_VIA_OUT)) {
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ