Issue 535 - Unaligned access in BER decoder
Summary: Unaligned access in BER decoder
Status: VERIFIED FIXED
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: slapd (show other issues)
Version: unspecified
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2000-05-15 12:44 UTC by christian.zuckschwerdt@informatik.uni-oldenburg.de
Modified: 2014-08-01 21:06 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description christian.zuckschwerdt@informatik.uni-oldenburg.de 2000-05-15 12:44:26 UTC
Full_Name: Christian Zuckschwerdt
Version: 1.2.10
OS: OSF1 V4.0 alpha
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (134.106.21.48)


There seems to be a unaligned access problem for Tru64 (alpha cpu):

Unaligned access <slapd> va=0x14048fa8c pc=0x12003eb98 ra=0x12003eb80

Program received signal SIGBUS, Bus error.
ber_getnint (ber=0x0, num=0x14048fa8c, len=1) at decode.c:166
166             return( len );                               

(gdb) bt                      
#0  ber_getnint (ber=0x0, num=0x14048fa8c, len=1) at decode.c:166
#1  0x12003ec28 in ber_get_int (ber=0x140015100, num=0x14048fa8c)
    at decode.c:177                                              
#2  0x12003f458 in ber_scanf (ber=0x140015100, fmt=0x1400012d6 "iiib")
    at decode.c:445                                                   
#3  0x12000c3e0 in do_search (conn=0x14006ce78, op=0x14047b680) at search.c:65
#4  0x12000ba88 in connection_operation (arg_v=0x0) at connection.c:74        
#5  0x3ff805b5aec in __thdBase ()                                     

Comment 1 Kurt Zeilenga 2000-05-17 21:09:08 UTC
At 12:44 PM 5/15/00 GMT, christian.zuckschwerdt@informatik.uni-oldenburg.de wrote:
>There seems to be a unaligned access problem for Tru64 (alpha cpu):
>Unaligned access <slapd> va=0x14048fa8c pc=0x12003eb98 ra=0x12003eb80

Yes. such messages, I believe, can be safely ignored.

The SIGBUS is likely unrelated.

>Program received signal SIGBUS, Bus error.
>ber_getnint (ber=0x0, num=0x14048fa8c, len=1) at decode.c:166
>166             return( len );                               

The stack appears to be trashed (ber=NULL).  You'll likely
have to toy about with the debugger to sort out exactly what
happen.

>(gdb) bt                      
>#0  ber_getnint (ber=0x0, num=0x14048fa8c, len=1) at decode.c:166
>#1  0x12003ec28 in ber_get_int (ber=0x140015100, num=0x14048fa8c)
>    at decode.c:177                                              
>#2  0x12003f458 in ber_scanf (ber=0x140015100, fmt=0x1400012d6 "iiib")
>    at decode.c:445                                                   
>#3  0x12000c3e0 in do_search (conn=0x14006ce78, op=0x14047b680) at search.c:65
>#4  0x12000ba88 in connection_operation (arg_v=0x0) at connection.c:74        
>#5  0x3ff805b5aec in __thdBase ()                                     
>
>
>
>
Comment 2 Kurt Zeilenga 2000-05-17 21:11:57 UTC
Actually, you might experiment with replacing ber_getnint()
code with that from -devel.  It avoids the AC_NTOHL() call
which can be problematic.

	Kurt

At 12:44 PM 5/15/00 GMT, christian.zuckschwerdt@informatik.uni-oldenburg.de wrote:
>Full_Name: Christian Zuckschwerdt
>Version: 1.2.10
>OS: OSF1 V4.0 alpha
>URL: ftp://ftp.openldap.org/incoming/
>Submission from: (NULL) (134.106.21.48)
>
>
>There seems to be a unaligned access problem for Tru64 (alpha cpu):
>
>Unaligned access <slapd> va=0x14048fa8c pc=0x12003eb98 ra=0x12003eb80
>
>Program received signal SIGBUS, Bus error.
>ber_getnint (ber=0x0, num=0x14048fa8c, len=1) at decode.c:166
>166             return( len );                               
>
>(gdb) bt                      
>#0  ber_getnint (ber=0x0, num=0x14048fa8c, len=1) at decode.c:166
>#1  0x12003ec28 in ber_get_int (ber=0x140015100, num=0x14048fa8c)
>    at decode.c:177                                              
>#2  0x12003f458 in ber_scanf (ber=0x140015100, fmt=0x1400012d6 "iiib")
>    at decode.c:445                                                   
>#3  0x12000c3e0 in do_search (conn=0x14006ce78, op=0x14047b680) at search.c:65
>#4  0x12000ba88 in connection_operation (arg_v=0x0) at connection.c:74        
>#5  0x3ff805b5aec in __thdBase ()                                     
>
>
>
>
Comment 3 Ben Collins 2000-05-17 21:21:40 UTC
On Mon, May 15, 2000 at 12:44:28PM +0000, christian.zuckschwerdt@informatik.uni-oldenburg.de wrote:
> Full_Name: Christian Zuckschwerdt
> Version: 1.2.10
> OS: OSF1 V4.0 alpha
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (134.106.21.48)
> 
> 
> There seems to be a unaligned access problem for Tru64 (alpha cpu):

I have a fix for this that someone with Debian's Alpha porters came up
with. Basically it involves passing int/long around without size
considerations (which on alpha has bad results). I'll revisit this shortly
and see if I can checkin the proper patch.

Ben

-- 
 -----------=======-=-======-=========-----------=====------------=-=------
/  Ben Collins  --  ...on that fantastic voyage...  --  Debian GNU/Linux   \
`  bcollins@debian.org  --  bcollins@openldap.org  --  bcollins@linux.com  '
 `---=========------=======-------------=-=-----=-===-======-------=--=---'
Comment 4 Kurt Zeilenga 2000-05-18 13:20:37 UTC
moved from Incoming to Software Bugs
Comment 5 Kurt Zeilenga 2000-08-18 16:48:14 UTC
changed notes
changed state Open to Suspended
Comment 6 Kurt Zeilenga 2000-09-01 11:51:46 UTC
changed state Suspended to Closed
Comment 7 OpenLDAP project 2014-08-01 21:06:54 UTC
Fixed in devel, may be back ported if desired.