GCC Newspaper
NOVEMBER 30, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
libssp

libssp supports _FORTIFY_SOURCE=3

Stack smashing protection library (libssp) now supports _FORTIFY_SOURCE=3.

The libssp (stack smashing protection) library now supports _FORTIFY_SOURCE=3 by incorporating __builtin_dynamic_object_size. This allows for enhanced security checks, particularly for dynamic objects, when the compiler is invoked with this specific macro defined. The changes involve updating the ssp.h.in header to conditionally enable this support.

In Details

The libssp header has been updated to conditionally define __SSP_FORTIFY_LEVEL to 3 when _FORTIFY_SOURCE is greater than 2 and the compiler supports __builtin_dynamic_object_size. Subsequently, when __SSP_FORTIFY_LEVEL is greater than 2, it utilizes __builtin_dynamic_object_size for security checks. This enables more robust runtime checks for buffer overflows involving dynamically allocated objects.

For Context
libssp
The GNU C Library's implementation of Stack-Smashing Protection (SSP), a security mechanism to detect buffer overflows on the stack.
_FORTIFY_SOURCE
A preprocessor macro that enables compile-time checks for common buffer overflow vulnerabilities. Higher levels provide more checks.
__builtin_dynamic_object_size
A GCC built-in function that returns the size of a dynamically allocated object, used here for enhanced security checks in libssp.
Stack Smashing
A type of security exploit where an attacker overwrites data on the program's stack, often to gain control of program execution.
Filed Under: securitylibsspfortify source