Hide Forgot
Created attachment 518906 [details] Test Application Description of problem: I have Scientific Linux 6.0 on my machine and apparently the version of libpcap that's distributed with it (libpcap-1.0.0-6.20091201git117cb5.el6.x86_64) has a bug when opening a device with a snaplen smaller than 13. Besides, even if the snaplen is greater or equal to 13, the captured packet size won't match the selected snaplen. The following message will be displayed when reading from a device that's been opened with a snaplen < 13: "Error reading the packets: corrupted frame on kernel ring mac offset 70 + caplen 0 > frame len 64" Apparently these two bugs have already been fixed in the latest version of libpcap. I attached a test application to show what I described. Version-Release number of selected component (if applicable): libpcap-1.0.0-6.20091201git117cb5.el6.x86_64 How reproducible: Always Steps to Reproduce: 1. FIRST_TEST: Open an interface with pcap_open_live setting a snaplen < 13, then read packets. 2. SECOND_TEST: Open an interface with pcap_open_live setting a snaplen >=13, read packets and check that the snaplen is the same as set in pcap_open_live Actual results: 1. The message "Error reading the packets: corrupted frame on kernel ring mac offset 70 + caplen 0 > frame len 64" will appear 2. The length of the captured packets won't be the same as set in pcap_open_live Expected results: 1. Read packets normally 2. The length of the packets should match the snaplen set in pcap_open_live
This request was evaluated by Red Hat Product Management for inclusion in the current release of Red Hat Enterprise Linux. Because the affected component is not scheduled to be updated in the current release, Red Hat is unfortunately unable to address this request at this time. Red Hat invites you to ask your support representative to propose this request, if appropriate and relevant, in the next release of Red Hat Enterprise Linux. If you would like it considered as an exception in the current release, please ask your support representative.
Hello Fabrizio, thank you for reporting this issue. I've confirmed that it is actual bug in libpcap but after some further investigation I've found out that there is no straightforward way to backport a patch which solves this issue. There has been just too much development and changes done since version 1.0.0. As you correctly pointed out this issue is now resolved in the latest development version of libpcap. I hope that this issue will be solved in some upcoming major release of Red Hat Enterprise Linux by upgrading to new version of libpcap. Michal Sekletar
Created attachment 519671 [details] libpcap-linux-snaplen-mmap.patch We actually managed to create a patch from the git repository that fixed this bug. This is the commit that fixed the bug: https://github.com/mcr/libpcap/commit/9982024b5718fac524d8c637329206ea80d7b8ad
Hi, thank you for your patch and please excuse my mistake. Michal Sekletar
This might be fixed in 1.2.0; if not, it's fixed in the top of the 1.2 branch and the trunk, so it'll be fixed in the next release. (The Linux mmapping code gives me a pain where a pill can't reach it; as per my comment in another bug, maybe TPACKET_V3 will be less painful to work with.)
This request was evaluated by Red Hat Product Management for inclusion in the current release of Red Hat Enterprise Linux. Because the affected component is not scheduled to be updated in the current release, Red Hat is unable to address this request at this time. Red Hat invites you to ask your support representative to propose this request, if appropriate, in the next release of Red Hat Enterprise Linux.
This issue should be solved by rebase of libpcap in rhel-6.5. http://bulk-mail.corp.redhat.com/archives/cvs-commits-list/2013-August/msg09611.html
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2013-1727.html