UBSAN report for main [so: 14] /usr/sbin/traceroute: various misaligned address reports
I tried a /usr/sbin/traceroute from a chroot that had been built using WITH_UBSAN= in use. It got the common lib/libc/stdio/fread.c zero offset to null pointer notice but also reported "member access within misaligned address" for types: 'struct ifreq', which requires 8 byte alignment 'union (unnamed union at /usr/obj/BUILDs/main-amd64-nodbg-clang-alt/usr/main-src/amd64.amd64/tmp/usr/include/net/if.h:398:2)', which requires 8 byte alignment 'struct sockaddr', which requires 8 byte alignment 'unsigned char', which requires 8 byte alignment The reports are: /usr/main-src/lib/libc/stdio/fread.c:133:10: runtime error: applying zero offset to null pointer SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /usr/main-src/lib/libc/stdio/fread.c:133:10 in /usr/main-src/contrib/traceroute/ifaddrlist.c:113:13: runtime error: member access within misaligned address 0x7fff55fc for type 'struct ifreq', which requires 8 byte alignment 0x7fff55fc: note: pointer points here 00 00 00 00 6c 6f 30 00 00 00 00 00 00 00 00 00 00 00 00 00 1c 1c 00 00 00 00 00 00 fe 80 00 02 ^ SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /usr/main-src/contrib/traceroute/ifaddrlist.c:113:13 in /usr/main-src/contrib/traceroute/ifaddrlist.c:113:13: runtime error: member access within misaligned address 0x7fff560c for type 'union (unnamed union at /usr/obj/BUILDs/main-amd64-nodbg-clang-alt/usr/main-src/amd64.amd64/tmp/usr/include/net/if.h:398:2)', which requires 8 byte alignment 0x7fff560c: note: pointer points here 00 00 00 00 1c 1c 00 00 00 00 00 00 fe 80 00 02 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 ^ SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /usr/main-src/contrib/traceroute/ifaddrlist.c:113:13 in /usr/main-src/contrib/traceroute/ifaddrlist.c:113:13: runtime error: member access within misaligned address 0x7fff560c for type 'struct sockaddr', which requires 8 byte alignment 0x7fff560c: note: pointer points here 00 00 00 00 1c 1c 00 00 00 00 00 00 fe 80 00 02 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 ^ SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /usr/main-src/contrib/traceroute/ifaddrlist.c:113:13 in /usr/main-src/contrib/traceroute/ifaddrlist.c:113:22: runtime error: load of misaligned address 0x7fff560c for type 'unsigned char', which requires 8 byte alignment 0x7fff560c: note: pointer points here 00 00 00 00 1c 1c 00 00 00 00 00 00 fe 80 00 02 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 ^ SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /usr/main-src/contrib/traceroute/ifaddrlist.c:113:22 in /usr/main-src/contrib/traceroute/ifaddrlist.c:118:13: runtime error: member access within misaligned address 0x7fff55fc for type 'struct ifreq', which requires 8 byte alignment 0x7fff55fc: note: pointer points here 00 00 00 00 6c 6f 30 00 00 00 00 00 00 00 00 00 00 00 00 00 1c 1c 00 00 00 00 00 00 fe 80 00 02 ^ SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /usr/main-src/contrib/traceroute/ifaddrlist.c:118:13 in /usr/main-src/contrib/traceroute/ifaddrlist.c:118:13: runtime error: member access within misaligned address 0x7fff560c for type 'union (unnamed union at /usr/obj/BUILDs/main-amd64-nodbg-clang-alt/usr/main-src/amd64.amd64/tmp/usr/include/net/if.h:398:2)', which requires 8 byte alignment 0x7fff560c: note: pointer points here 00 00 00 00 1c 1c 00 00 00 00 00 00 fe 80 00 02 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 ^ SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /usr/main-src/contrib/traceroute/ifaddrlist.c:118:13 in /usr/main-src/contrib/traceroute/ifaddrlist.c:118:13: runtime error: member access within misaligned address 0x7fff560c for type 'struct sockaddr', which requires 8 byte alignment 0x7fff560c: note: pointer points here 00 00 00 00 1c 1c 00 00 00 00 00 00 fe 80 00 02 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 ^ SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /usr/main-src/contrib/traceroute/ifaddrlist.c:118:13 in === Mark Millard marklmi at yahoo.com
Traceroute
IPSEC is hard-defined into the Makefile...not good, especially for PicoBSD. -- snip -- --- /usr/src/usr.sbin/traceroute/Makefile.orig Thu Mar 30 14:16:52 2000 +++ /usr/src/usr.sbin/traceroute/Makefile Thu Mar 30 14:23:28 2000 @@ -5,4 +5,11 @@ BINMODE=4555 + +.ifndef (NOIPSEC) CFLAGS+=-DHAVE_SYS_SELECT_H=1 -DHAVE_SETLINEBUF=1 -DHAVE_RAW_OPTIONS=1 \ -DSTDC_HEADERS=1 -DIPSEC +.else +CFLAGS+=-DHAVE_SYS_SELECT_H=1 -DHAVE_SETLINEBUF=1 -DHAVE_RAW_OPTIONS=1 \ + -DSTDC_HEADERS=1 +.endif + # RTT Jitter on the internet these days means printing 3 decimal places on @@ -14,4 +21,7 @@ CLEANFILES+= version.c + +.ifndef (NOIPSEC) DPADD= ${LIBIPSEC} LDADD= -lipsec +.endif -- snip -- -- +-+ | Omachonu Ogali [EMAIL PROTECTED] | | Intranova Networking Group http://tribune.intranova.net | | PGP Key ID: 0xBFE60839 | | PGP Fingerprint: C8 51 14 FD 2A 87 53 D1 E3 AA 12 12 01 93 BD 34 | +-+ To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
su and traceroute
I just cvsuped to -current right after bind-8.2.2 was merged into the source tree. I noticed two problems. Su won't work and traceroute gives me the following traceroute: icmp socket: Operation not permitted here are its permissions -r-sr-xr-x 1 root wheel 12076 Dec 1 14:15 /usr/sbin/traceroute su just says Sorry and it has the same permissions, I ran gdb on it and here's a screen shot 253 if (pwd-pw_uid == 0 (gr = getgrgid((gid_t)0)) (gdb) step255 for (g = gr-gr_mem;; ++g) {(gdb) step256 if (!*g) {(gdb) step262 if (strcmp(username, *g) == 0) {(gdb) step255 for (g = gr-gr_mem;; ++g) {(gdb) step256 if (!*g) {(gdb) step262 if (strcmp(username, *g) == 0) {(gdb) step271 if (*pwd-pw_passwd) {(gdb) step278 p = skey_getpass("Password:", pwd, 1);(gdb) stepPassword:279 if (!(!strcmp(pwd-pw_passwd, skey_crypt(p, pwd-pw_passwd, pwd, 1))(gdb) step292 fprintf(stderr, "Sorry\n");(gdb) Anyone have any ideas? I am in the wheel group, but I shouldn't have to be for traceroute and I have this problem for all users, including new ones that I create.
Nevermind: su and traceroute
Nevermind, I had nosuid in fstab, totally forgot about it. - Original Message - From: David W. Chapman Jr. To: [EMAIL PROTECTED] Sent: Wednesday, December 01, 1999 3:54 PM Subject: su and traceroute I just cvsuped to -current right after bind-8.2.2 was merged into the source tree. I noticed two problems. Su won't work and traceroute gives me the following traceroute: icmp socket: Operation not permitted here are its permissions -r-sr-xr-x 1 root wheel 12076 Dec 1 14:15 /usr/sbin/traceroute su just says Sorry and it has the same permissions, I ran gdb on it and here's a screen shot 253 if (pwd-pw_uid == 0 (gr = getgrgid((gid_t)0)) (gdb) step255 for (g = gr-gr_mem;; ++g) {(gdb) step256 if (!*g) {(gdb) step262 if (strcmp(username, *g) == 0) {(gdb) step255 for (g = gr-gr_mem;; ++g) {(gdb) step256 if (!*g) {(gdb) step262 if (strcmp(username, *g) == 0) {(gdb) step271 if (*pwd-pw_passwd) {(gdb) step278 p = skey_getpass("Password:", pwd, 1);(gdb) stepPassword:279 if (!(!strcmp(pwd-pw_passwd, skey_crypt(p, pwd-pw_passwd, pwd, 1))(gdb) step292 fprintf(stderr, "Sorry\n");(gdb) Anyone have any ideas? I am in the wheel group, but I shouldn't have to be for traceroute and I have this problem for all users, including new ones that I create.
Re: traceroute patch
Archie Cobbs writes: I have this patch for traceroute that adds the ability to send packets with an arbitrary IP protocol number, instead of just TCP and UDP. This is mainly useful to see if some router between points A and B is blocking packets based on IP protocol number. I sent it to tracero...@ee.lbl.gov but got no response. Is this something people might be interested in? Is it worth committing? We've found it useful on occasion. ftp://ftp.whistle.com/pub/archie/misc/traceroute.patch Hmm.. since nobody replied, I'll try a more provocative question.. :-) Does anyone object to me committing this patch? Thanks, -Archie ___ Archie Cobbs * Whistle Communications, Inc. * http://www.whistle.com To Unsubscribe: send mail to majord...@freebsd.org with unsubscribe freebsd-current in the body of the message
traceroute patch
I have this patch for traceroute that adds the ability to send packets with an arbitrary IP protocol number, instead of just TCP and UDP. This is mainly useful to see if some router between points A and B is blocking packets based on IP protocol number. I sent it to tracero...@ee.lbl.gov but got no response. Is this something people might be interested in? Is it worth committing? We've found it useful on occasion. ftp://ftp.whistle.com/pub/archie/misc/traceroute.patch -Archie ___ Archie Cobbs * Whistle Communications, Inc. * http://www.whistle.com To Unsubscribe: send mail to majord...@freebsd.org with unsubscribe freebsd-current in the body of the message
Netgraph Was:(Re: traceroute patch)
On Mon, 3 May 1999, Archie Cobbs wrote: I have this patch for traceroute that adds the ability to send [snip] How is it going with netgraph? I have looked at the -net archives on and off and it's very quit. Is it still going to be committed? /Johan -Archie ___ Archie Cobbs * Whistle Communications, Inc. * http://www.whistle.com To Unsubscribe: send mail to majord...@freebsd.org with unsubscribe freebsd-current in the body of the message To Unsubscribe: send mail to majord...@freebsd.org with unsubscribe freebsd-current in the body of the message
Re: Netgraph Was:(Re: traceroute patch)
Johan Granlund writes: How is it going with netgraph? I have looked at the -net archives on and off and it's very quit. Is it still going to be committed? Netgraph is doing well.. several people have tried it and/or are using it. One guy in Finland has reimplemented the whole concept in Java for an industrial process automation system :-) We (Julian and myself) have been too busy with other stuff lately to do much new development. However, we have a list of things to do... hopefully we can get back to doing more development on it soon. I'm particularly interested in revamping the PPP node and making corresponding changes in mpd to support it, so that mpd+netgraph can do full kernel-only routing over any link type. Also, I'd like to netgraphify the i4b code. As for committing it, more demand/interest is needed before doing that. -Archie ___ Archie Cobbs * Whistle Communications, Inc. * http://www.whistle.com To Unsubscribe: send mail to majord...@freebsd.org with unsubscribe freebsd-current in the body of the message
Re: Netgraph Was:(Re: traceroute patch)
On Mon, 3 May 1999, Archie Cobbs wrote: Johan Granlund writes: How is it going with netgraph? I have looked at the -net archives on and off and it's very quit. Is it still going to be committed? Netgraph is doing well.. several people have tried it and/or are using it. One guy in Finland has reimplemented the whole concept in Java for an industrial process automation system :-) Sounds like what i'm proposing at work only it's access control in my case. I'we got another programmer that's into alarm systems to reschool himself from windows to Unix programming. Hopefully something will become of this /Johan -Archie ___ Archie Cobbs * Whistle Communications, Inc. * http://www.whistle.com To Unsubscribe: send mail to majord...@freebsd.org with unsubscribe freebsd-current in the body of the message