Bug 1283801 - ngrep segfaults on Fedora 23
Summary: ngrep segfaults on Fedora 23
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: ngrep
Version: 23
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Fabio Alessandro Locati
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1352682 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-11-19 22:54 UTC by Sylvain Pasche
Modified: 2017-07-31 18:42 UTC (History)
6 users (show)

Fixed In Version: ngrep-1.47-0.1.a39256b.fc25 ngrep-1.47-0.1.a39256b.fc24 ngrep-1.47-0.1.a39256b.fc23 ngrep-1.47-0.1.a39256b.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-07 23:25:36 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Sylvain Pasche 2015-11-19 22:54:19 UTC
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>

Comment 1 Fedora Admin XMLRPC Client 2016-02-26 17:48:33 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 2 Fedora Admin XMLRPC Client 2016-02-28 07:49:36 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 3 marcus.hunger 2016-05-02 13:23:29 UTC
I can confirm that this problem still exists.

Comment 4 marcus.hunger 2016-06-06 16:40:39 UTC
Compiling with --disable-pcap-restart fixes the problem.

Comment 5 Sergei LITVINENKO 2016-07-13 19:20:03 UTC
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

Comment 6 Sergei LITVINENKO 2016-09-25 18:50:28 UTC
is it planned to push fixed version to repo?

Comment 7 Sergei LITVINENKO 2016-10-14 20:32:00 UTC
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)

Comment 8 Fabio Alessandro Locati 2016-10-29 17:24:59 UTC
*** Bug 1352682 has been marked as a duplicate of this bug. ***

Comment 9 Fedora Update System 2016-10-30 18:49:35 UTC
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

Comment 10 Fedora Update System 2016-10-30 19:24:13 UTC
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

Comment 11 Fedora Update System 2016-10-30 20:22:06 UTC
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

Comment 12 Fedora Update System 2016-10-31 10:22:26 UTC
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

Comment 13 Sergei LITVINENKO 2016-10-31 19:26:32 UTC
Looks OK

Comment 14 Sergei LITVINENKO 2016-10-31 19:31:20 UTC
[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

Comment 15 Fedora Update System 2016-11-03 18:23:42 UTC
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.

Comment 16 Fedora Update System 2016-11-07 23:25:36 UTC
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.

Comment 17 Fedora Update System 2016-11-08 22:53:12 UTC
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.

Comment 18 Fedora Update System 2016-11-19 12:48:36 UTC
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.

Comment 19 Fedora Update System 2016-11-19 21:04:34 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.