sparc64/187381: [panic] pfsync: memory address not aligned

Boris Lytochkin lytboris at
Sat Mar 8 20:40:00 UTC 2014

>Number:         187381
>Category:       sparc64
>Synopsis:       [panic] pfsync: memory address not aligned
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-sparc64
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Mar 08 20:40:00 UTC 2014
>Originator:     Boris Lytochkin
>Release:        10.0-STABLE
private person
FreeBSD 10.0-STABLE FreeBSD 10.0-STABLE #1 r262232M: Fri Feb 21 11:29:53 MSK 2014     boris at  sparc64

An unligned memory access is possible in the following part of code:
====sys/netpfil/pf/if_pfsync.c, ~450 line==================
        if (PF_ANEQ(&sp->key[PF_SK_WIRE].addr[0],
            &sp->key[PF_SK_STACK].addr[0], sp->af) ||
            &sp->key[PF_SK_STACK].addr[1], sp->af) ||
            sp->key[PF_SK_WIRE].port[0] != sp->key[PF_SK_STACK].port[0] ||
            sp->key[PF_SK_WIRE].port[1] != sp->key[PF_SK_STACK].port[1]) {
                sks = uma_zalloc(V_pf_state_key_z, M_NOWAIT);
                if (sks == NULL)
                        goto cleanup;
        } else
                sks = skw;
once &sp->key[PF_SK_WIRE].addr is not an 32-bit aligned address (PF_ANEQ operates with uint32)
Setup a pfsync link between sparc64-based routers and wait some time until the problem is triggered.


More information about the freebsd-sparc64 mailing list