Subject: alignment crash in v6 ipfilter when receiving on gif
To: None <port-sparc64@netbsd.org, darrenr@netbsd.org>
From: Greg Troxel <gdt@ir.bbn.com>
List: port-sparc64
Date: 07/09/2007 15:02:21
On a U2 running recent 4.0_BETA2, doing

traceroute6 <host-that's on other side of a gif>

results in a panic

softnet
ip6intr
ip6_input
pfil_run_hooks
fr_check
kernel trap 34, address not aligned:
fr_makefrip+0xd74:  ldx [%12 + 0x18], %g

I can see about provoking this again and getting the value of %12, but
from looking at the code I can't see how it ensures the packet is 4-byte
aligned.  I have a digital photo, still in camera, of the backtrace.
This seems to happen every time I run traceroute6.  ping6 is ok.

I just noticed this, but I can't swear I didn't do similar traceroute6s
with the previous version of the system (~March netbsd-4).

I see in fr_check #ifdef MENTAT to drop packets that aren't "~3"
aligned.  Should ipfilter be doing some sort of non-aligned extraction,
or copying the packet if it isn't aligned, or something else?