[asterisk-bugs] [Asterisk 0011018]: patch for 10979 breaks IAX RSA auth

noreply at bugs.digium.com noreply at bugs.digium.com
Wed Oct 17 23:20:09 CDT 2007


The following issue has been ASSIGNED. 
====================================================================== 
http://bugs.digium.com/view.php?id=11018 
====================================================================== 
Reported By:                dimas
Assigned To:                russell
====================================================================== 
Project:                    Asterisk
Issue ID:                   11018
Category:                   Core-General
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     assigned
Asterisk Version:            SVN 
SVN Branch (only for SVN checkouts, not tarball releases):  1.4  
SVN Revision (number only!): 85687 
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             10-17-2007 19:01 CDT
Last Modified:              10-17-2007 23:20 CDT
====================================================================== 
Summary:                    patch for 10979 breaks IAX RSA auth
Description: 
The commit 85543 wasn't really a good idea.
base64 _decoder_ will most likely produce binary data anyway (why base64
otherwise?) so there is no sense in nul-terminating these data. If string
data is expected from decode operation, it is up to calling code to provide
buffer of enough size and nul-terminate it.

res_crypto __ast_check_signature provides fixed size buffer exactly
matching the expected size of binary data so when base64 decoder forces
nul-termination it effectively kills last byte of binary data and RSA key
verification always fails.
======================================================================
Relationships       ID      Summary
----------------------------------------------------------------------
related to          0010979 [path] main/util.c missed *dst='\0'; in...
====================================================================== 

---------------------------------------------------------------------- 
 svnbot - 10-17-07 23:20  
---------------------------------------------------------------------- 
Repository: asterisk
Revision: 86237

U   branches/1.4/main/utils.c

------------------------------------------------------------------------
r86237 | russell | 2007-10-17 23:20:06 -0500 (Wed, 17 Oct 2007) | 9 lines

Revert a change that I made for issue http://bugs.digium.com/view.php?id=10979
which, as has been pointed
out to
me in issue http://bugs.digium.com/view.php?id=11018, doesn't really make sense.
 There is no reason to have
the base64 decode function force a ' ' terminated buffer, when the result
is
almost always binary, anyway.  In fact, this caused some breakage, as some
code
in res_crypto passed in a buffer exactly the right size to get its binary
result, which got stomped on by this patch.

(closes issue http://bugs.digium.com/view.php?id=11018, reported by dimas)

------------------------------------------------------------------------ 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
10-17-07 23:20  svnbot         Checkin                                      
10-17-07 23:20  svnbot         Note Added: 0072212                          
10-17-07 23:20  svnbot         Status                   new => assigned     
10-17-07 23:20  svnbot         Assigned To               => russell         
======================================================================




More information about the asterisk-bugs mailing list