Bug 715042 - dsniff segfaults when decoding RPC packets on x86_64
Summary: dsniff segfaults when decoding RPC packets on x86_64
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: dsniff
Version: 14
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Robert Scheck
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-06-21 17:20 UTC by Matthew Boyle
Modified: 2014-01-04 22:46 UTC (History)
2 users (show)

Fixed In Version: dsniff-2.4-0.17.b1.el5
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 850494 (view as bug list)
Environment:
Last Closed: 2012-08-16 15:14:49 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
use XDS to decode RPC messages (1.11 KB, text/plain)
2011-06-21 17:20 UTC, Matthew Boyle
no flags Details

Description Matthew Boyle 2011-06-21 17:20:22 UTC
Created attachment 505870 [details]
use XDS to decode RPC messages

Description of problem:

in /usr/include/rpc/rpc_msg.h, elements of struct rpc_msg are defined as u_long, but reference 32 bit values (cf. bug 132802).  this means that on systems where u_long is 64 bits, rpc_msg.rm_direction is offset too far into the buffer.

in decode_rpc() in rpc.c, dsniff checks whether the rm_direction field is a CALL or a REPLY.  if it doesn't match either (likely, since it's checking a completely different part of the message) it calls xdr_getpos() on an uninitialised xdrs.

i've attached a patch to work around this, by always using xdr routines directly.  the main difference is that it no longer sets the following in REPLY messages:

msg->acpted_rply.ar_results.proc = (xdrproc_t) xdr_void;

i'm afraid i'm not familiar enough with the inner workings of XDR to know whether this is important.  a less intrusive alternative would be to catch the else condition, and just return 0...


Version-Release number of selected component (if applicable):

dsniff-2.4-0.9.b1.fc14   (affected)
dsniff-2.4-0.10.b1.fc15  (affected, patch against this)

the Debian Squeeze i386 package, which is not affected.  unfortunately i don't have any i386 Fedora boxes to hand to test on.


How reproducible:

very easy:  run dsniff on a 64 bit system, and introduce it to some RPC traffic (either by sniffing, or feeding it a pcap capture file).  i can probably supply a suitable capture if necessary.


Steps to Reproduce:

1. sudo /usr/sbin/dsniff
2. # wait for some RPC traffic
3. # segfaults in rpc_decode()
  

Actual results:

segfault.


Expected results:

no segfault! :-)

Additional info:

Comment 1 Fedora End Of Life 2012-08-16 15:14:52 UTC
This message is a notice that Fedora 14 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 14. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained.  At this time, all open bugs with a Fedora 'version'
of '14' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this 
occurring, but we forgot to do that. A thousand apologies.)

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, feel free to reopen 
this bug and simply change the 'version' to a later Fedora version.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we were unable to fix it before Fedora 14 reached end of life. If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora, you are encouraged to click on 
"Clone This Bug" (top right of this page) and open it against that 
version of Fedora.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 2 Fedora Update System 2013-12-20 22:17:44 UTC
dsniff-2.4-0.17.b1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/dsniff-2.4-0.17.b1.fc20

Comment 3 Fedora Update System 2013-12-20 22:18:32 UTC
dsniff-2.4-0.17.b1.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/dsniff-2.4-0.17.b1.fc19

Comment 4 Fedora Update System 2013-12-20 22:19:23 UTC
dsniff-2.4-0.17.b1.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/dsniff-2.4-0.17.b1.fc18

Comment 5 Fedora Update System 2013-12-20 22:20:21 UTC
dsniff-2.4-0.17.b1.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/dsniff-2.4-0.17.b1.el6

Comment 6 Fedora Update System 2013-12-20 22:21:10 UTC
dsniff-2.4-0.17.b1.el5 has been submitted as an update for Fedora EPEL 5.
https://admin.fedoraproject.org/updates/dsniff-2.4-0.17.b1.el5

Comment 7 Fedora Update System 2013-12-22 05:30:25 UTC
dsniff-2.4-0.17.b1.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 8 Fedora Update System 2013-12-22 05:32:44 UTC
dsniff-2.4-0.17.b1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2013-12-22 05:42:04 UTC
dsniff-2.4-0.17.b1.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 10 Fedora Update System 2013-12-22 17:35:03 UTC
dsniff-2.4-0.17.b1.el6 has been pushed to the Fedora EPEL 6 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 11 Fedora Update System 2014-01-04 22:46:33 UTC
dsniff-2.4-0.17.b1.el5 has been pushed to the Fedora EPEL 5 stable repository.  If problems still persist, please make note of it in this bug report.


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