Bug 21373 - libpcap buffer overflow
Summary: libpcap buffer overflow
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: tcpdump
Version: 6.2
Hardware: i386
OS: Linux
low
medium
Target Milestone: ---
Assignee: Harald Hoyer
QA Contact:
URL:
Whiteboard:
Keywords: Security
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-11-27 12:54 UTC by Jarno Huuskonen
Modified: 2008-05-01 15:37 UTC (History)
1 user (show)

(edit)
Clone Of:
(edit)
Last Closed: 2000-11-27 16:07:39 UTC


Attachments (Terms of Use)
Patch to fix libpcap strcpy(ifr.ifr_name, device) overflow (1.62 KB, patch)
2000-11-27 12:55 UTC, Jarno Huuskonen
no flags Details | Diff

Description Jarno Huuskonen 2000-11-27 12:54:18 UTC
Libpcap has a buffer overflow. Libpcap uses strcpy to copy a 
device (interface-name) to ifreq.ifr_name (16-byte buffer).
The buffer can be overflowed if the program using libpcap passes
userdefined 'device' to pcap_open_live.
Test: tcpdump -i `perl -e "print 'A'x1000"`

This is not big problem unless someone has made a setuid libpcap program.

I'm attaching a patch that seems to fix this.

(Also it looks like might pcap-dlpi.c suffers from similar problem).

Comment 1 Jarno Huuskonen 2000-11-27 12:55:50 UTC
Created attachment 5731 [details]
Patch to fix libpcap strcpy(ifr.ifr_name, device) overflow


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