Running tcpdump on a non-existing or unconfigured device crashes phone (only in terminal app, not ssh)

Bug #1539768 reported by AlainKnaff
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu Terminal App
New
Undecided
Unassigned

Bug Description

Running tcpdump twice on a network device that doesn't exist or is simply configured down crashes the phone:

tcpdump -ni abc

On first attempt, it exits right away

On second attempt, the phone freezes, then reboots

This only happens when commands issued in terminal, not in an ssh session.

After the first attempt, the following is logged to the kernel log:

[ 161.951328] type=1400 audit(1454100495.849:172): apparmor="DENIED" operation="file_inherit" profile="/usr/sbin/tcpdump" name="/dev/pts/48" pid=4472 comm="tcpdump" requested_mask="wr" denied_mask="wr" fsuid=0 ouid=32011
[ 161.951428] type=1400 audit(1454100495.849:173): apparmor="DENIED" operation="file_inherit" profile="/usr/sbin/tcpdump" name="/dev/pts/48" pid=4472 comm="tcpdump" requested_mask="wr" denied_mask="wr" fsuid=0 ouid=32011
[ 161.951537] type=1400 audit(1454100495.849:174): apparmor="DENIED" operation="file_inherit" profile="/usr/sbin/tcpdump" name="/dev/pts/48" pid=4472 comm="tcpdump" requested_mask="wr" denied_mask="wr" fsuid=0 ouid=32011
[ 162.087330] type=1400 audit(1454100495.989:175): apparmor="DENIED" operation="file_perm" profile="/usr/sbin/tcpdump" name="/dev/pts/48" pid=4472 comm="tcpdump" requested_mask="w" denied_mask="w" fsuid=0 ouid=32011
[ 162.087433] type=1400 audit(1454100495.989:176): apparmor="DENIED" operation="file_perm" profile="/usr/sbin/tcpdump" name="/dev/pts/48" pid=4472 comm="tcpdump" requested_mask="w" denied_mask="w" fsuid=0 ouid=32011
[ 162.087519] type=1400 audit(1454100495.989:177): apparmor="DENIED" operation="file_perm" profile="/usr/sbin/tcpdump" name="/dev/pts/48" pid=4472 comm="tcpdump" requested_mask="w" denied_mask="w" fsuid=0 ouid=32011
[ 162.368152] [lcm_esd_check]buffer[0]=0x1c[lcm_esd_check]buffer[0]=0x1c[lcm_esd_check]buffer[0]=0x1c[lcm_esd_check]buffer[0]=0x1c
root@alains-pocket-penguin:~# Write failed: Broken pipe

Revision history for this message
AlainKnaff (kubuntu-misc) wrote :

Actually, this happens also on existing and configured interfaces, with the following difference in the first call:

1. If device doesn't exist, first call exits right away, without any error message (... but with an exit status of 1).

2. If the device *does* exist, commands keeps running (as it should), but doesn't show any traffic, even if there is actually traffic.

Second call always leads to crash (in case #2, interrupt first call with Control-C)

Again, this only happens in a terminal session. In an ssh session you do get an error message when trying to tcpdump a non-existing device, and you do see traffic if you tcpdump an existing device which has traffic.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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