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

Boris Lytochkin lytboris at gmail.com
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
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Mar 08 20:40:00 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator:     Boris Lytochkin
>Release:        10.0-STABLE
>Organization:
private person
>Environment:
FreeBSD rfloor1.cars 10.0-STABLE FreeBSD 10.0-STABLE #1 r262232M: Fri Feb 21 11:29:53 MSK 2014     boris at sparc1.cars:/usr/obj/usr/src/sys/CARSROUTER  sparc64

>Description:
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) ||
            PF_ANEQ(&sp->key[PF_SK_WIRE].addr[1],
            &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)
>How-To-Repeat:
Setup a pfsync link between sparc64-based routers and wait some time until the problem is triggered.
>Fix:


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-sparc64 mailing list