NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

bin/56199: tcpdump has unaligned access bugs on NetBSD/alpha



>Number:         56199
>Category:       bin
>Synopsis:       tcpdump has unaligned access bugs on NetBSD/alpha
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun May 23 14:50:00 +0000 2021
>Originator:     Jason Thorpe
>Release:        NetBSD 9.99.82
>Organization:
RISCy Business
>Environment:
NetBSD alpha-vm 9.99.82 NetBSD 9.99.82 (GENERIC-$Revision: 1.410 $) #1: Sat May 22 11:30:30 PDT 2021  thorpej@the-ripe-vessel:/space/src/sys/arch/alpha/compile/GENERIC.QEMU alpha
>Description:
tcpdump has unaligned access bugs on NetBSD/alpha:

[ 1477.9520728] pid 5002 (tcpdump): unaligned access: va=0x3fffd7ac036 pc=0x1200c958c ra=0x1200cc910 sp=0x1ffffed60 op=ldl
[ 1478.0128703] pid 5002 (tcpdump): unaligned access: va=0x3fffd7ac036 pc=0x1200c962c ra=0x1200c95d0 sp=0x1ffffed60 op=ldl
[ 1478.0741963] pid 5002 (tcpdump): unaligned access: va=0x3fffd7ac036 pc=0x1200c958c ra=0x1200cc910 sp=0x1ffffed60 op=ldl
[ 1478.0950691] pid 5002 (tcpdump): unaligned access: va=0x3fffd7ac036 pc=0x1200c962c ra=0x1200c95d0 sp=0x1ffffed60 op=ldl
[ 1478.1169752] pid 5002 (tcpdump): unaligned access: va=0x3fffd7ac036 pc=0x1200c958c ra=0x1200cc910 sp=0x1ffffed60 op=ldl
[ 1478.1169752] pid 5002 (tcpdump): unaligned access: va=0x3fffd7ac036 pc=0x1200c962c ra=0x1200c95d0 sp=0x1ffffed60 op=ldl
[ 1478.1373753] pid 5002 (tcpdump): unaligned access: va=0x3fffd7ac036 pc=0x1200c958c ra=0x1200cc910 sp=0x1ffffed60 op=ldl
[ 1478.1373753] pid 5002 (tcpdump): unaligned access: va=0x3fffd7ac036 pc=0x1200c962c ra=0x1200c95d0 sp=0x1ffffed60 op=ldl

...and apparently intentionally so:

#if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 409)
#define UNALIGNED_OK    __attribute__((no_sanitize_undefined))
#elif __has_attribute(no_sanitize)
#define UNALIGNED_OK    __attribute__((no_sanitize("undefined")))
#else
#define UNALIGNED_OK
#endif

This may cause crashes on platforms that do not support unaligned memory accesses.
>How-To-Repeat:
Run the net/t_ipv6address ATF test cases.
>Fix:
N/A



Home | Main Index | Thread Index | Old Index