Bug 695426 - SIGBUS resolving srv records
Summary: SIGBUS resolving srv records
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: c-ares
Version: 6.1
Hardware: sparcv9
OS: Linux
high
urgent
Target Milestone: rc
: ---
Assignee: Jakub Hrozek
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On: 695424
Blocks: 750334
TreeView+ depends on / blocked
 
Reported: 2011-04-11 17:24 UTC by Stephen Gallagher
Modified: 2012-06-20 14:27 UTC (History)
7 users (show)

Fixed In Version: c-ares-1.7.0-6.el6
Doc Type: Bug Fix
Doc Text:
Clone Of: 695424
Environment:
Last Closed: 2012-06-20 14:27:44 UTC
Target Upstream Version:


Attachments (Terms of Use)
A reproducer (2.42 KB, text/plain)
2011-04-12 08:19 UTC, Jakub Hrozek
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2012:0922 0 normal SHIPPED_LIVE c-ares bug fix update 2012-06-19 20:46:10 UTC

Description Stephen Gallagher 2011-04-11 17:24:55 UTC
+++ This bug was initially created as a clone of Bug #695424 +++

Created attachment 491286 [details]
full backtrace of the crash

Description of problem:

using sssd with srv record lookup enabled im getting a sigbus in c-ares on sparc

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


How reproducible: always


Steps to Reproduce:
1. start sssd
2. try to log in
3.
  
Actual results:
Program received signal SIGBUS, Bus error.
ares_parse_srv_reply (abuf=0xff855720 ")r\205\200", alen=238, srv_out=0xff85551c) at ares_parse_srv_reply.c:142
142	          srv_curr->priority = ntohs (*((unsigned short *)vptr));

Expected results:
things to work

Additional info:

SIGBUS on sparc means that there is a memory alignment issue.  this will likely effect arm and s390 also

Comment 1 Jakub Hrozek 2011-04-12 08:19:20 UTC
Created attachment 491425 [details]
A reproducer

A simple program that is able to resolve a SRV query. To compile, run:

gcc ares_srv.c -o ares_srv -lcares

To resolve a query, pass a nameserver and a SRV query to the program:

./ares_srv 1.2.3.4 _ldap._tcp.example.com

Comment 5 Jakub Hrozek 2011-12-11 19:03:38 UTC
This was fixed upstream by using the DNS__<XY>BIT macros instead of ntohs.

Comment 9 errata-xmlrpc 2012-06-20 14:27:44 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2012-0922.html


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