IBM Support

LI76633: BAD STACKPROTECT WITH VARIABLE LENGTH ARRAY

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as program error.

Error description

  • When using the -qstackprotect feature, the system is throwing
    the stack smash error incorrectly in a function containing a
    variable length array.
    
    
       ===== Example Output =====
    
    $ ./a.out
    *** stack smashing detected ***: program terminated
    IOT/Abort trap (core dumped)
    $
    

Local fix

  • N/A
    

Problem summary

  • PROBLEM DESCRIPTION:
    After defining a variable length array, the stack pointer is
    updated to increase the size of the stack.  When loading the
    stack canary word at the end of a function, the offset used
    assumed that the stack pointer did not change, resulting in
    loading an incorrect value.
    
    USERS AFFECTED:
    Stack protect (-qstackprotect) users with source code
    containing variable length arrays.
    

Problem conclusion

  • Stack protect feature was corrected, and now loads the canary
    word from the correct location.
    

Temporary fix

Comments

APAR Information

  • APAR number

    LI76633

  • Reported component name

    XL C/C++ FOR LI

  • Reported component ID

    5724X1400

  • Reported release

    B10

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2012-02-06

  • Closed date

    2012-02-06

  • Last modified date

    2012-02-06

  • APAR is sysrouted FROM one or more of the following:

    IV09886

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    XL C/C++ FOR LI

  • Fixed component ID

    5724X1400

Applicable component levels



Document information

More support for: XL C/C++ for Linux

Software version: B10

Reference #: LI76633

Modified date: 06 February 2012