Description of problem: ngrep segfaults on Fedora 23 if you give it a filter. It worked fine on Fedora 22. Version-Release number of selected component (if applicable): rpm -q ngrep ngrep-1.45-19.git20131221.16ba99a.fc23.x86_64 Steps to Reproduce: # ngrep -d eth0 port 80 interface: eth0 (192.168.122.0/255.255.255.0) Segmentation fault (core dumped) # gdb --args ngrep -d eth0 port 80 [...] Reading symbols from ngrep...Reading symbols from /usr/lib/debug/usr/sbin/ngrep.debug...done. done. (gdb) r Starting program: /usr/sbin/ngrep -d eth0 port 80 [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". interface: eth0 (192.168.122.0/255.255.255.0) (gdb) bt full #0 __GI___fileno (fp=fp@entry=0xffffffff) at fileno.c:36 No locals. #1 0x00007ffff7bbce23 in pcap__init_buffer (b=0x55555575c2f0, file=file@entry=0xffffffff) at scanner.c:4375 oerrno = 95 #2 0x00007ffff7bbcff2 in pcap_restart (input_file=0xffffffff) at scanner.c:4256 No locals. #3 0x0000555555556448 in main (argc=5, argv=0x7fffffffe3f8) at ngrep.c:419 c = <optimized out>
This package has changed ownership in the Fedora Package Database. Reassigning to the new owner of this component.
I can confirm that this problem still exists.
Compiling with --disable-pcap-restart fixes the problem.
Fedora-24 is affected too. [root@homedesk ~]# ngrep -d br0 port 80 interface: br0 (10.119.100.0/255.255.255.0) Segmentation fault (core dumped) [root@homedesk ~]# ngrep -d br0 host 8.8.8.8 interface: br0 (10.119.100.0/255.255.255.0) Segmentation fault (core dumped) [root@homedesk ~]# rpm -qf `which ngrep` ngrep-1.45-20.git20131221.16ba99a.fc24.x86_64 (gdb) set args -d br0 host 8.8.8.8 (gdb) run Starting program: /usr/sbin/ngrep -d br0 host 8.8.8.8 [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". interface: br0 (10.119.100.0/255.255.255.0) Program received signal SIGSEGV, Segmentation fault. __GI___fileno (fp=fp@entry=0xffffffff) at fileno.c:35 35 if (!(fp->_flags & _IO_IS_FILEBUF) || _IO_fileno (fp) < 0) (gdb) bt full #0 __GI___fileno (fp=fp@entry=0xffffffff) at fileno.c:35 No locals. #1 0x00007ffff7bb99b3 in pcap__init_buffer (b=0x55555576c8d0, file=file@entry=0xffffffff) at scanner.c:4375 oerrno = 95 #2 0x00007ffff7bb9b82 in pcap_restart (input_file=0xffffffff) at scanner.c:4256 No locals. #3 0x00005555555561ea in main (argc=5, argv=0x7fffffffe2d8) at ngrep.c:419 c = -1 --- (gdb) file ngrep Reading symbols from ngrep...Reading symbols from /usr/lib/debug/usr/sbin/ngrep.debug...done. done. (gdb) set args -d br0 port 80 (gdb) run Starting program: /usr/sbin/ngrep -d br0 port 80 [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". interface: br0 (10.119.100.0/255.255.255.0) Program received signal SIGSEGV, Segmentation fault. __GI___fileno (fp=fp@entry=0xffffffff) at fileno.c:35 35 if (!(fp->_flags & _IO_IS_FILEBUF) || _IO_fileno (fp) < 0) (gdb) bt full #0 __GI___fileno (fp=fp@entry=0xffffffff) at fileno.c:35 No locals. #1 0x00007ffff7bb99b3 in pcap__init_buffer (b=0x55555575c2f0, file=file@entry=0xffffffff) at scanner.c:4375 oerrno = 95 #2 0x00007ffff7bb9b82 in pcap_restart (input_file=0xffffffff) at scanner.c:4256 No locals. #3 0x00005555555561ea in main (argc=5, argv=0x7fffffffe2e8) at ngrep.c:419 c = -1
is it planned to push fixed version to repo?
fedora-25 (betta) is affected too... [root@fedora25 ~]# rpm -qf `which ngrep` ngrep-1.45-20.git20131221.16ba99a.fc24.x86_64 [root@fedora25 ~]# ngrep -d ens3 host 8.8.8.8 interface: ens3 (10.119.100.0/255.255.255.0) Segmentation fault (core dumped)
*** Bug 1352682 has been marked as a duplicate of this bug. ***
ngrep-1.47-0.1.a39256b.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-c35645efad
ngrep-1.47-0.1.a39256b.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-ffc4de257e
ngrep-1.47-0.1.a39256b.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-4b66b70a71
ngrep-1.47-0.1.a39256b.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-270fd4b659
Looks OK
[root@homedesk ~]# dnf update --enablerepo=updates-testing ngrep Обновление : ngrep-1.47-0.1.a39256b.fc24.x86_64 1/2 Очистка : ngrep-1.45-20.git20131221.16ba99a.fc24SL.x86_64 2/2 Проверка : ngrep-1.47-0.1.a39256b.fc24.x86_64 1/2 Проверка : ngrep-1.45-20.git20131221.16ba99a.fc24SL.x86_64 2/2 [root@homedesk ~]# ngrep -d br0 host 8.8.8.8 interface: br0 (10.119.100.0/255.255.255.0) filter: ( host 8.8.8.8 ) and ((ip || ip6) || (vlan && (ip || ip6))) # I 10.119.100.100 -> 8.8.8.8 8:0 6......X.....P...................... !"#$%&'()*+,-./01234567 # I 8.8.8.8 -> 10.119.100.100 0:0 6......X.....P...................... !"#$%&'()*+,-./01234567 # I 10.119.100.100 -> 8.8.8.8 8:0 6......X.....U...................... !"#$%&'()*+,-./01234567 # I 8.8.8.8 -> 10.119.100.100 0:0 6......X.....U...................... !"#$%&'()*+,-./01234567 # I 10.119.100.100 -> 8.8.8.8 8:0 6......X.....Y...................... !"#$%&'()*+,-./01234567 # I 8.8.8.8 -> 10.119.100.100 0:0 6......X.....Y...................... !"#$%&'()*+,-./01234567 ---- [sergeil@homedesk MySql]$ ping -c 3 8.8.8.8 PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data. 64 bytes from 8.8.8.8: icmp_seq=1 ttl=49 time=36.0 ms 64 bytes from 8.8.8.8: icmp_seq=2 ttl=49 time=36.0 ms 64 bytes from 8.8.8.8: icmp_seq=3 ttl=49 time=35.8 ms
ngrep-1.47-0.1.a39256b.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.
ngrep-1.47-0.1.a39256b.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.
ngrep-1.47-0.1.a39256b.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.
ngrep-1.47-0.1.a39256b.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.