Bug 850494 - dsniff segfaults when decoding RPC packets on x86_64
dsniff segfaults when decoding RPC packets on x86_64
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: dsniff (Show other bugs)
16
x86_64 Linux
unspecified Severity unspecified
: ---
: ---
Assigned To: Robert Scheck
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-21 12:43 EDT by Matthew Boyle
Modified: 2014-01-04 17:46 EST (History)
1 user (show)

See Also:
Fixed In Version: dsniff-2.4-0.17.b1.el5
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 715042
Environment:
Last Closed: 2013-02-13 16:35:19 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Matthew Boyle 2012-08-21 12:43:47 EDT
just replicated this problem on a Fedora 16 box.  same issue with xdrs being used without being initialised first.  the patch from bug 715042 still seems to work.


+++ This bug was initially created as a clone of Bug #715042 +++

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:

--- Additional comment from endoflife@fedoraproject.org on 2012-08-16 11:14:52 EDT ---

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 1 Fedora End Of Life 2013-01-16 12:11:17 EST
This message is a reminder that Fedora 16 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 16. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '16'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 16's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 16 is 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" 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 End Of Life 2013-02-13 16:35:22 EST
Fedora 16 changed to end-of-life (EOL) status on 2013-02-12. Fedora 16 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.
Comment 3 Fedora Update System 2013-12-20 17:17:49 EST
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 4 Fedora Update System 2013-12-20 17:18:36 EST
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 5 Fedora Update System 2013-12-20 17:19:26 EST
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 6 Fedora Update System 2013-12-20 17:20:25 EST
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 7 Fedora Update System 2013-12-20 17:21:14 EST
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 8 Fedora Update System 2013-12-22 00:30:31 EST
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 9 Fedora Update System 2013-12-22 00:32:47 EST
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 10 Fedora Update System 2013-12-22 00:42:07 EST
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 11 Fedora Update System 2013-12-22 12:35:08 EST
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 12 Fedora Update System 2014-01-04 17:46:38 EST
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.