Project

General

Profile

Actions

Bug #4736

open

Task #4735: tracking: ubsan clean

ubsan: misaligned memory loads

Added by Victor Julien about 3 years ago. Updated 4 months ago.

Status:
New
Priority:
Normal
Assignee:
Target version:
Affected Versions:
Effort:
Difficulty:
Label:

Description

A quick pcap + rules run with ubsan enabled suggests many issues in misaligned memory access

decode-icmpv4.c:62:9: runtime error: load of misaligned address 0x61e001c45c7a for type 'uint8_t' (aka 'unsigned char'), which requires 4 byte alignment
decode-icmpv4.c:62:9: runtime error: member access within misaligned address 0x61e001c45c7a for type 'IPV4Hdr' (aka 'struct IPV4Hdr_'), which requires 4 byte alignment
decode-icmpv4.c:74:33: runtime error: member access within misaligned address 0x61e001c45c7a for type 'IPV4Hdr' (aka 'struct IPV4Hdr_'), which requires 4 byte alignment
decode-icmpv4.c:74:33: runtime error: member access within misaligned address 0x61e001c45c86 for type 'struct (anonymous struct at ./decode-ipv4.h:81:9)', which requires 4 byte alignment
decode-icmpv4.c:74:33: runtime error: member access within misaligned address 0x61e001c45c86 for type 'union (anonymous union at ./decode-ipv4.h:80:5)', which requires 4 byte alignment
decode-icmpv4.c:75:33: runtime error: member access within misaligned address 0x61e001c45c7a for type 'IPV4Hdr' (aka 'struct IPV4Hdr_'), which requires 4 byte alignment
decode-icmpv4.c:75:33: runtime error: member access within misaligned address 0x61e001c45c86 for type 'struct (anonymous struct at ./decode-ipv4.h:81:9)', which requires 4 byte alignment
decode-icmpv4.c:75:33: runtime error: member access within misaligned address 0x61e001c45c86 for type 'union (anonymous union at ./decode-ipv4.h:80:5)', which requires 4 byte alignment
decode-icmpv4.c:77:32: runtime error: load of misaligned address 0x61e001c45c7a for type 'uint8_t' (aka 'unsigned char'), which requires 4 byte alignment
decode-icmpv4.c:77:32: runtime error: member access within misaligned address 0x61e001c45c7a for type 'IPV4Hdr' (aka 'struct IPV4Hdr_'), which requires 4 byte alignment
decode-icmpv4.c:79:13: runtime error: member access within misaligned address 0x61e001c45c7a for type 'IPV4Hdr' (aka 'struct IPV4Hdr_'), which requires 4 byte alignment
decode-ipv4.c:485:9: runtime error: load of misaligned address 0x61e001c45c5e for type 'uint8_t' (aka 'unsigned char'), which requires 4 byte alignment
decode-ipv4.c:490:9: runtime error: load of misaligned address 0x61e001c45c5e for type 'uint8_t' (aka 'unsigned char'), which requires 4 byte alignment
decode-ipv4.c:490:9: runtime error: member access within misaligned address 0x61e001c45c5e for type 'IPV4Hdr' (aka 'struct IPV4Hdr_'), which requires 4 byte alignment
decode-ipv4.c:495:9: runtime error: member access within misaligned address 0x61e001c45c5e for type 'IPV4Hdr' (aka 'struct IPV4Hdr_'), which requires 4 byte alignment
decode-ipv4.c:501:5: runtime error: load of misaligned address 0x61e001c45c6a for type 'in_addr_t' (aka 'unsigned int'), which requires 4 byte alignment
decode-ipv4.c:501:5: runtime error: member access within misaligned address 0x61e001c45c5e for type 'IPV4Hdr' (aka 'struct IPV4Hdr_'), which requires 4 byte alignment
decode-ipv4.c:501:5: runtime error: member access within misaligned address 0x61e001c45c6a for type 'struct (anonymous struct at ./decode-ipv4.h:81:9)', which requires 4 byte alignment
decode-ipv4.c:501:5: runtime error: member access within misaligned address 0x61e001c45c6a for type 'struct in_addr', which requires 4 byte alignment
decode-ipv4.c:501:5: runtime error: member access within misaligned address 0x61e001c45c6a for type 'union (anonymous union at ./decode-ipv4.h:80:5)', which requires 4 byte alignment
decode-ipv4.c:502:5: runtime error: load of misaligned address 0x61e001c45c6e for type 'in_addr_t' (aka 'unsigned int'), which requires 4 byte alignment
decode-ipv4.c:502:5: runtime error: member access within misaligned address 0x61e001c45c5e for type 'IPV4Hdr' (aka 'struct IPV4Hdr_'), which requires 4 byte alignment
decode-ipv4.c:502:5: runtime error: member access within misaligned address 0x61e001c45c6a for type 'struct (anonymous struct at ./decode-ipv4.h:81:9)', which requires 4 byte alignment
decode-ipv4.c:502:5: runtime error: member access within misaligned address 0x61e001c45c6a for type 'union (anonymous union at ./decode-ipv4.h:80:5)', which requires 4 byte alignment
decode-ipv4.c:502:5: runtime error: member access within misaligned address 0x61e001c45c6e for type 'struct in_addr', which requires 4 byte alignment
decode-ipv4.c:505:26: runtime error: load of misaligned address 0x61e001c45c5e for type 'uint8_t' (aka 'unsigned char'), which requires 4 byte alignment
decode-ipv4.c:505:26: runtime error: member access within misaligned address 0x61e001c45c5e for type 'IPV4Hdr' (aka 'struct IPV4Hdr_'), which requires 4 byte alignment
decode-ipv4.c:533:16: runtime error: member access within misaligned address 0x61e001c45c5e for type 'IPV4Hdr' (aka 'struct IPV4Hdr_'), which requires 4 byte alignment
decode-ipv4.c:536:9: runtime error: member access within misaligned address 0x61e001c45c5e for type 'IPV4Hdr' (aka 'struct IPV4Hdr_'), which requires 4 byte alignment
decode-ipv4.c:560:13: runtime error: member access within misaligned address 0x61e001c45c5e for type 'IPV4Hdr' (aka 'struct IPV4Hdr_'), which requires 4 byte alignment
decode-ipv4.c:562:41: runtime error: load of misaligned address 0x61e001c45c5e for type 'uint8_t' (aka 'unsigned char'), which requires 4 byte alignment
decode-ipv4.c:562:41: runtime error: member access within misaligned address 0x61e001c45c5e for type 'IPV4Hdr' (aka 'struct IPV4Hdr_'), which requires 4 byte alignment
decode-ipv4.c:563:23: runtime error: member access within misaligned address 0x61e001c45c5e for type 'IPV4Hdr' (aka 'struct IPV4Hdr_'), which requires 4 byte alignment
decode-ipv4.c:563:43: runtime error: load of misaligned address 0x61e001c45c5e for type 'uint8_t' (aka 'unsigned char'), which requires 4 byte alignment
decode-ipv4.c:563:43: runtime error: member access within misaligned address 0x61e001c45c5e for type 'IPV4Hdr' (aka 'struct IPV4Hdr_'), which requires 4 byte alignment
decode-ipv4.c:566:41: runtime error: load of misaligned address 0x61e001c45c5e for type 'uint8_t' (aka 'unsigned char'), which requires 4 byte alignment
decode-ipv4.c:566:41: runtime error: member access within misaligned address 0x61e001c45c5e for type 'IPV4Hdr' (aka 'struct IPV4Hdr_'), which requires 4 byte alignment
decode-ipv4.c:567:23: runtime error: member access within misaligned address 0x61e001c45c5e for type 'IPV4Hdr' (aka 'struct IPV4Hdr_'), which requires 4 byte alignment
decode-ipv4.c:567:43: runtime error: load of misaligned address 0x61e001c45c5e for type 'uint8_t' (aka 'unsigned char'), which requires 4 byte alignment
decode-ipv4.c:567:43: runtime error: member access within misaligned address 0x61e001c45c5e for type 'IPV4Hdr' (aka 'struct IPV4Hdr_'), which requires 4 byte alignment
decode-ipv4.c:570:44: runtime error: load of misaligned address 0x61e001c45c5e for type 'uint8_t' (aka 'unsigned char'), which requires 4 byte alignment
decode-ipv4.c:570:44: runtime error: member access within misaligned address 0x61e001c45c5e for type 'IPV4Hdr' (aka 'struct IPV4Hdr_'), which requires 4 byte alignment
decode-ipv4.c:571:26: runtime error: member access within misaligned address 0x61e001c45c5e for type 'IPV4Hdr' (aka 'struct IPV4Hdr_'), which requires 4 byte alignment
decode-ipv4.c:571:46: runtime error: load of misaligned address 0x61e001c45c5e for type 'uint8_t' (aka 'unsigned char'), which requires 4 byte alignment
decode-ipv4.c:571:46: runtime error: member access within misaligned address 0x61e001c45c5e for type 'IPV4Hdr' (aka 'struct IPV4Hdr_'), which requires 4 byte alignment
flow.c:443:35: runtime error: load of misaligned address 0x61e001c45c66 for type 'uint8_t' (aka 'unsigned char'), which requires 4 byte alignment
flow.c:443:35: runtime error: member access within misaligned address 0x61e001c45c5e for type 'IPV4Hdr' (aka 'struct IPV4Hdr_'), which requires 4 byte alignment
flow.c:465:35: runtime error: load of misaligned address 0x61e001c45c66 for type 'uint8_t' (aka 'unsigned char'), which requires 4 byte alignment
flow.c:465:35: runtime error: member access within misaligned address 0x61e001c45c5e for type 'IPV4Hdr' (aka 'struct IPV4Hdr_'), which requires 4 byte alignment
flow-hash.c:149:29: runtime error: load of misaligned address 0x61e001c45c86 for type 'in_addr_t' (aka 'unsigned int'), which requires 4 byte alignment
flow-hash.c:149:29: runtime error: member access within misaligned address 0x61e001c45c7a for type 'IPV4Hdr' (aka 'struct IPV4Hdr_'), which requires 4 byte alignment
flow-hash.c:149:29: runtime error: member access within misaligned address 0x61e001c45c86 for type 'struct (anonymous struct at ./decode-ipv4.h:81:9)', which requires 4 byte alignment
flow-hash.c:149:29: runtime error: member access within misaligned address 0x61e001c45c86 for type 'struct in_addr', which requires 4 byte alignment
flow-hash.c:149:29: runtime error: member access within misaligned address 0x61e001c45c86 for type 'union (anonymous union at ./decode-ipv4.h:80:5)', which requires 4 byte alignment
flow-hash.c:150:29: runtime error: load of misaligned address 0x61e001c45c8a for type 'in_addr_t' (aka 'unsigned int'), which requires 4 byte alignment
flow-hash.c:150:29: runtime error: member access within misaligned address 0x61e001c45c7a for type 'IPV4Hdr' (aka 'struct IPV4Hdr_'), which requires 4 byte alignment
flow-hash.c:150:29: runtime error: member access within misaligned address 0x61e001c45c86 for type 'struct (anonymous struct at ./decode-ipv4.h:81:9)', which requires 4 byte alignment
flow-hash.c:150:29: runtime error: member access within misaligned address 0x61e001c45c86 for type 'union (anonymous union at ./decode-ipv4.h:80:5)', which requires 4 byte alignment
flow-hash.c:150:29: runtime error: member access within misaligned address 0x61e001c45c8a for type 'struct in_addr', which requires 4 byte alignment
flow-hash.c:376:39: runtime error: load of misaligned address 0x61e001c45c86 for type 'in_addr_t' (aka 'unsigned int'), which requires 4 byte alignment
flow-hash.c:376:39: runtime error: member access within misaligned address 0x61e001c45c7a for type 'IPV4Hdr' (aka 'struct IPV4Hdr_'), which requires 4 byte alignment
flow-hash.c:376:39: runtime error: member access within misaligned address 0x61e001c45c86 for type 'struct (anonymous struct at ./decode-ipv4.h:81:9)', which requires 4 byte alignment
flow-hash.c:376:39: runtime error: member access within misaligned address 0x61e001c45c86 for type 'struct in_addr', which requires 4 byte alignment
flow-hash.c:376:39: runtime error: member access within misaligned address 0x61e001c45c86 for type 'union (anonymous union at ./decode-ipv4.h:80:5)', which requires 4 byte alignment
flow-hash.c:377:43: runtime error: load of misaligned address 0x61e001c45c8a for type 'in_addr_t' (aka 'unsigned int'), which requires 4 byte alignment
flow-hash.c:377:43: runtime error: member access within misaligned address 0x61e001c45c7a for type 'IPV4Hdr' (aka 'struct IPV4Hdr_'), which requires 4 byte alignment
flow-hash.c:377:43: runtime error: member access within misaligned address 0x61e001c45c86 for type 'struct (anonymous struct at ./decode-ipv4.h:81:9)', which requires 4 byte alignment
flow-hash.c:377:43: runtime error: member access within misaligned address 0x61e001c45c86 for type 'union (anonymous union at ./decode-ipv4.h:80:5)', which requires 4 byte alignment
flow-hash.c:377:43: runtime error: member access within misaligned address 0x61e001c45c8a for type 'struct in_addr', which requires 4 byte alignment
flow-hash.c:389:46: runtime error: load of misaligned address 0x61e001c45c86 for type 'in_addr_t' (aka 'unsigned int'), which requires 4 byte alignment
flow-hash.c:389:46: runtime error: member access within misaligned address 0x61e001c45c7a for type 'IPV4Hdr' (aka 'struct IPV4Hdr_'), which requires 4 byte alignment
flow-hash.c:389:46: runtime error: member access within misaligned address 0x61e001c45c86 for type 'struct (anonymous struct at ./decode-ipv4.h:81:9)', which requires 4 byte alignment
flow-hash.c:389:46: runtime error: member access within misaligned address 0x61e001c45c86 for type 'struct in_addr', which requires 4 byte alignment
flow-hash.c:389:46: runtime error: member access within misaligned address 0x61e001c45c86 for type 'union (anonymous union at ./decode-ipv4.h:80:5)', which requires 4 byte alignment
flow-hash.c:390:43: runtime error: load of misaligned address 0x61e001c45c8a for type 'in_addr_t' (aka 'unsigned int'), which requires 4 byte alignment
flow-hash.c:390:43: runtime error: member access within misaligned address 0x61e001c45c7a for type 'IPV4Hdr' (aka 'struct IPV4Hdr_'), which requires 4 byte alignment
flow-hash.c:390:43: runtime error: member access within misaligned address 0x61e001c45c86 for type 'struct (anonymous struct at ./decode-ipv4.h:81:9)', which requires 4 byte alignment
flow-hash.c:390:43: runtime error: member access within misaligned address 0x61e001c45c86 for type 'union (anonymous union at ./decode-ipv4.h:80:5)', which requires 4 byte alignment
flow-hash.c:390:43: runtime error: member access within misaligned address 0x61e001c45c8a for type 'struct in_addr', which requires 4 byte alignment
flow-util.c:156:9: runtime error: load of misaligned address 0x61e001c45c6a for type 'in_addr_t' (aka 'unsigned int'), which requires 4 byte alignment
flow-util.c:156:9: runtime error: member access within misaligned address 0x61e001c45c5e for type 'IPV4Hdr' (aka 'struct IPV4Hdr_'), which requires 4 byte alignment
flow-util.c:156:9: runtime error: member access within misaligned address 0x61e001c45c6a for type 'struct (anonymous struct at ./decode-ipv4.h:81:9)', which requires 4 byte alignment
flow-util.c:156:9: runtime error: member access within misaligned address 0x61e001c45c6a for type 'struct in_addr', which requires 4 byte alignment
flow-util.c:156:9: runtime error: member access within misaligned address 0x61e001c45c6a for type 'union (anonymous union at ./decode-ipv4.h:80:5)', which requires 4 byte alignment
flow-util.c:157:9: runtime error: load of misaligned address 0x61e001c45c6e for type 'in_addr_t' (aka 'unsigned int'), which requires 4 byte alignment
flow-util.c:157:9: runtime error: member access within misaligned address 0x61e001c45c5e for type 'IPV4Hdr' (aka 'struct IPV4Hdr_'), which requires 4 byte alignment
flow-util.c:157:9: runtime error: member access within misaligned address 0x61e001c45c6a for type 'struct (anonymous struct at ./decode-ipv4.h:81:9)', which requires 4 byte alignment
flow-util.c:157:9: runtime error: member access within misaligned address 0x61e001c45c6a for type 'union (anonymous union at ./decode-ipv4.h:80:5)', which requires 4 byte alignment
flow-util.c:157:9: runtime error: member access within misaligned address 0x61e001c45c6e for type 'struct in_addr', which requires 4 byte alignment
flow-util.c:158:53: runtime error: load of misaligned address 0x61e001c45c66 for type 'uint8_t' (aka 'unsigned char'), which requires 4 byte alignment
flow-util.c:158:53: runtime error: member access within misaligned address 0x61e001c45c5e for type 'IPV4Hdr' (aka 'struct IPV4Hdr_'), which requires 4 byte alignment

Actions #1

Updated by Victor Julien about 3 years ago

  • Tracker changed from Task to Bug

These are probably different issues, feel free to break out into more (sub)tickets.

Actions #2

Updated by Philippe Antoine 11 months ago

Is this really a problem ?
I would close this ticket. (and the parent one)
oss-fuzz runs UBSAN with a good set of UBSAN_OPTIONS
Are they missing some ?

Actions #3

Updated by Philippe Antoine 5 months ago

  • Assignee set to Philippe Antoine
  • Target version set to TBD
Actions #4

Updated by Philippe Antoine 5 months ago

I think this one should be closed

Actions #5

Updated by Victor Julien 4 months ago

  • Assignee changed from Philippe Antoine to OISF Dev
Actions

Also available in: Atom PDF