Bug 1760457 (CVE-2018-14879) - CVE-2018-14879 tcpdump: Out of bounds read/write in in get_next_file() in tcpdump.c
Summary: CVE-2018-14879 tcpdump: Out of bounds read/write in in get_next_file() in tcp...
Alias: CVE-2018-14879
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
Depends On: 1760626 1791694 1791695
Blocks: 1760628
TreeView+ depends on / blocked
Reported: 2019-10-10 15:09 UTC by Pedro Sampaio
Modified: 2020-11-04 03:40 UTC (History)
6 users (show)

Fixed In Version: tcpdump 4.9.3
Doc Type: If docs needed, set a value
Doc Text:
An out-of-bounds write vulnerability was discovered in tcpdump while reading the file passed to the -V option of the command line program. An attacker may abuse this flaw by tricking a victim user into using a malicious file with the -V option, which would make the program read one byte before a stack-based allocated buffer and potentially write a NULL byte to it.
Clone Of:
Last Closed: 2020-11-04 02:22:00 UTC

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2020:4760 0 None None None 2020-11-04 03:40:43 UTC

Description Pedro Sampaio 2019-10-10 15:09:33 UTC
The command-line argument parser in tcpdump before 4.9.3 has a buffer overflow in tcpdump.c:get_next_file().

Upstream patch:




Comment 1 Pedro Sampaio 2019-10-11 00:01:46 UTC
Created tcpdump tracking bugs for this issue:

Affects: fedora-all [bug 1760626]

Comment 2 Riccardo Schirone 2020-01-15 11:10:44 UTC
tcpdump provides the `V` flag when you want to provide a list of filenames to use, either by stdin or by reading the content of a file. The attack scenario for this flaw is an attacker who tricks a victim user into executing `tcpdump -V` on a malicious file with a NULL byte as a first byte. This would make the program read one byte before the expected stack-allocated buffer and potentially write back a NULL byte in that same position.

This could cause other effects and potentially execute code on the victim' system.

Comment 3 Riccardo Schirone 2020-01-15 11:14:41 UTC
Given what said in comment 2:
- AV:L: the attack would be Local because the user should download the malicious file first and then run `tcpdump -V` on it
- UI:R: it is necessary that the victim user runs the program himself, an attacker cannot perform the attack without him doing something
- C:H/I:H/A:H: an out-of-bounds read+write on the stack could potentially lead to code execution
- AC:H: the complexity is High as the attacker cannot directly influence what's written outside the buffer and he would need anyway to bypass security measures as ASLR, at least (not assuming data-only attacks).

Comment 5 Product Security DevOps Team 2020-11-04 02:22:00 UTC
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):


Comment 6 errata-xmlrpc 2020-11-04 03:40:41 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2020:4760 https://access.redhat.com/errata/RHSA-2020:4760

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