[asterisk-bugs] [Asterisk 0018703]: Alignment issue cause multiple failures with 1.8 on ARM
Asterisk Bug Tracker
noreply at bugs.digium.com
Fri Jan 28 18:41:09 CST 2011
The following issue has been SUBMITTED.
======================================================================
https://issues.asterisk.org/view.php?id=18703
======================================================================
Reported By: Radael
Assigned To:
======================================================================
Project: Asterisk
Issue ID: 18703
Category: Core/Portability
Reproducibility: always
Severity: major
Priority: normal
Status: new
Asterisk Version: 1.8.2.3
JIRA:
Regression: No
Reviewboard Link:
SVN Branch (only for SVN checkouts, not tarball releases): N/A
SVN Revision (number only!):
Request Review:
======================================================================
Date Submitted: 2011-01-28 18:41 CST
Last Modified: 2011-01-28 18:41 CST
======================================================================
Summary: Alignment issue cause multiple failures with 1.8 on
ARM
Description:
Also seen on the Dockstar and other Kirkwood platforms.
The Kirkwood [all ARM cpus?] require addresses to be word, half-word or
byte aligned, depending on the type being stored into memory.
Asterisk dynamic string management uses a half-word value preceding the
string storage location to track the string length. When storing this
length, if the string is not half-word aligned, the length value will also
not be aligned and will trample on the terminating '\0' of the previous
string (adding an unprintable char to the end of the string). In addition,
setting the first string in a buffer could potentially corrupt some other
memory.
The result of this string mangling can be variety of errors. Since users
generally test their devices and connections before moving on to other
functionality, some of the more common "errors" presenting are:
In SIP:
* "ERROR[23208]: rtp_engine.c:325 ast_rtp_instance_new: No RTP engine
was found. Do you have one loaded?
[Nov 9 13:06:32] ERROR[23208]: chan_sip.c :8078 process_sdp: Got SDP
but have no RTP session allocated."
* The inability to use a secret.
* Issues with the deny/permit IP address ranges
In IAX:
* Failure to validate with RSA keys (could not find the keys)
* Failure to find the context and number when dialing into the pbx
from outside.
* Inability to use deny/permit to restrict by IP address
The actual error takes place in include/asterisk/stringfields.h
Line 304:
#define AST_STRING_FIELD_ALLOCATION(x) *((ast_string_field_allocation *)
(x - sizeof(ast_string_field_allocation)))
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2011-01-28 18:41 Radael New Issue
2011-01-28 18:41 Radael Asterisk Version => 1.8.2.3
2011-01-28 18:41 Radael Regression => No
2011-01-28 18:41 Radael SVN Branch (only for SVN checkouts, not tarball
releases) => N/A
======================================================================
More information about the asterisk-bugs
mailing list