Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 05 Apr 2019 12:03:27 -0700
From:      Cy Schubert <Cy.Schubert@cschubert.com>
To:        Enji Cooper <yaneurabeya@gmail.com>
Cc:        Michael Butler <imb@protected-networks.net>, freebsd-current <freebsd-current@freebsd.org>, phil@freebsd.org
Subject:   Re: SVN r345859: libxo broke netstat?
Message-ID:  <201904051903.x35J3RHM004658@slippy.cwsent.com>
In-Reply-To: Message from Enji Cooper <yaneurabeya@gmail.com> of "Fri, 05 Apr 2019 09:39:19 -0700." <8A6173F2-B6A5-48E6-9EC0-063698C0C511@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
In message <8A6173F2-B6A5-48E6-9EC0-063698C0C511@gmail.com>, Enji 
Cooper writes
:
> 
> > On Apr 5, 2019, at 5:19 AM, Michael Butler <imb@protected-networks.net> wro
> te:
> > 
> > Something changed in libxo that causes 'netstat -i' to segfault as below:
> > 
> > imb@toshi:/usr/src/usr.bin/netstat> lldb
> > /usr/obj/usr/src/amd64.amd64/usr.bin/netstat/netstat
> > (lldb) target create "/usr/obj/usr/src/amd64.amd64/usr.bin/netstat/netstat"
> > Current executable set to
> > '/usr/obj/usr/src/amd64.amd64/usr.bin/netstat/netstat' (x86_64).
> > (lldb) run -i
> > Process 65948 launching
> > Process 65948 launched:
> > '/usr/obj/usr/src/amd64.amd64/usr.bin/netstat/netstat' (x86_64)
> > Name    Mtu Network       Address              Ipkts Ierrs Idrop
> > Opkts Oerrs  Coll
> > Process 65948 stopped
> > * thread #1, name = 'netstat', stop reason = signal SIGSEGV: invalid
> > address (fault address: 0x0)
> >    frame #0: 0x00000008002987ad
> > libxo.so.0`___lldb_unnamed_symbol30$$libxo.so.0 + 669
> > libxo.so.0`___lldb_unnamed_symbol30$$libxo.so.0:
> > ->  0x8002987ad <+669>: movsbl (%r12), %eax
> >    0x8002987b2 <+674>: movslq %eax, %rbx
> >    0x8002987b5 <+677>: movq   0xac04(%rip), %r13
> >    0x8002987bc <+684>: testl  %eax, %eax
> > (lldb) bt
> > * thread #1, name = 'netstat', stop reason = signal SIGSEGV: invalid
> > address (fault address: 0x0)
> >  * frame #0: 0x00000008002987ad
> > libxo.so.0`___lldb_unnamed_symbol30$$libxo.so.0 + 669
> >    frame #1: 0x0000000800294e09
> > libxo.so.0`___lldb_unnamed_symbol24$$libxo.so.0 + 1401
> >    frame #2: 0x0000000800293b91
> > libxo.so.0`___lldb_unnamed_symbol22$$libxo.so.0 + 609
> >    frame #3: 0x0000000800293df0 libxo.so.0`xo_emit + 256
> >    frame #4: 0x0000000000212dc5 netstat`intpr + 1669
> >    frame #5: 0x0000000000217ecf netstat`main + 2431
> >    frame #6: 0x000000000021210f netstat`__fini_array_end + 271
>
> Michael,
> 	Could you please file a PR for this?
> Thank you!

Add arp(8) broken by the libxo import. It's broken at line 603 of 
libxo.c as well. A NULL pointer deref.


-- 
Cheers,
Cy Schubert <Cy.Schubert@cschubert.com>
FreeBSD UNIX:  <cy@FreeBSD.org>   Web:  http://www.FreeBSD.org

	The need of the many outweighs the greed of the few.





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201904051903.x35J3RHM004658>