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.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.
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()
no segfault! :-)
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:
dsniff-2.4-0.17.b1.fc20 has been submitted as an update for Fedora 20.
dsniff-2.4-0.17.b1.fc19 has been submitted as an update for Fedora 19.
dsniff-2.4-0.17.b1.fc18 has been submitted as an update for Fedora 18.
dsniff-2.4-0.17.b1.el6 has been submitted as an update for Fedora EPEL 6.
dsniff-2.4-0.17.b1.el5 has been submitted as an update for Fedora EPEL 5.
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.
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.
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.
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.
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.