usbmon broken

Bug #523340 reported by Pekka Pessi
28
This bug affects 3 people
Affects Status Importance Assigned to Milestone
libpcap (Debian)
Fix Released
Unknown
libpcap (Ubuntu)
Fix Released
Undecided
Unassigned
Lucid
Won't Fix
Medium
Unassigned

Bug Description

The libpcap 1.0.0 traces from usbmon fail because libpcap does not take into account 16 extra padding bytes present in the mmap interface used in Linux kernels 2.6.21 and later.

Problem is fixed in libpcap development version, but it can be circumvented in 1.0.0 if libpcap avoids using mmap interface.

This bug makes tracing USB devices with wireshark and tcpdump effectively useless.

TEST CASE:
See comment #3 (https://bugs.launchpad.net/ubuntu/+source/libpcap/+bug/523340/comments/3)

Tags: patch
Revision history for this message
Pekka Pessi (ppessi) wrote :
Revision history for this message
Brian Murray (brian-murray) wrote :

I'd like to help out fixing this bug and 523349 but I'm really not quite certain how to test this. Is testing it using wireshark and usb interfaces sufficient or can I use tcpdump some how? Thanks for your patch!

Changed in libpcap (Ubuntu):
status: New → Incomplete
tags: added: patch
Revision history for this message
Michael Hofmann (mh21) wrote :

Hi Brian,

for me the patch works, too. To test, do the following:
- install wireshark
- use lsusb to figure out which bus your usb mouse/keyboard etc. is on
- capture a trace of you pressing one button etc.:
  - with wireshark with the new libpcap
  - with the old libpcap
  - with cat /sys/kernel/debug/usb/usbmon/<bus>u
- if you have a usb keyboard, look in the USB_COMPLETE package for application data, it should be the same for the usbmon method and wireshark (the space key on my usb keyboard gives me 00002c00 00000000 for usbmon and the new libpcap, but 08000000 00000000 for the old one)

Hope this helps!

Revision history for this message
Evan Huus (eapache) wrote :

Michael, thanks for the steps. I can also reproduce this (on up-to-date Lucid), and the patch does solve the problem. Marking as confirmed.

Note to anyone else looking to reproduce this: libpcap does not "make install" the libraries where wireshark looks for them, you'll have to change the path in the makefile.

Changed in libpcap (Ubuntu):
status: Incomplete → Confirmed
Changed in libpcap (Debian):
status: Unknown → Fix Committed
Changed in libpcap (Debian):
status: Fix Committed → Fix Released
Evan Huus (eapache)
description: updated
Changed in libpcap (Ubuntu Lucid):
milestone: none → lucid-updates
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Michael Richardson (mcr-sandelman) wrote :

<email address hidden>. If a 1.0.1 release helps, then please speak up.

Revision history for this message
Evan Huus (eapache) wrote :

Not quite sure what's supposed to happen with this bug now? The new upstream version in Maverick fixes this, so I suppose that the general task should be marked as Fix Released. However it would still be good as an SRU for Lucid - what's the next step to get that looked at?

Revision history for this message
Martin Pitt (pitti) wrote :

The lucid task is still open; so if someone wants to prepare, teste, and upload a lucid SRU, that's fine.

Changed in libpcap (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Michael Richardson (mcr-sandelman) wrote :

I looked at the complexity and time required to produce a 1.0.1 with the correct fix, and it simply wasn't
within the tcpdump.org's ability to do.
We are in fact, overdue for a new regular release, which is late, so a 1.0.1 will not occur.

Revision history for this message
Rolf Leggewie (r0lf) wrote :

lucid has seen the end of its life and is no longer receiving any updates. Marking the lucid task for this ticket as "Won't Fix".

Changed in libpcap (Ubuntu Lucid):
status: Triaged → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.