glibc 2.3.4 introduced_FORTIFY_SOURCEin2004to catch security errors due to misuse of some C library functions. The initially supported functions wasfprintf, gets, memcpy, memmove, mempcpy, memset, printf, snprintf, sprintf, stpcpy, strcat, strcpy, strncat, strncpy, vfprintf, vprintf, vsnprintf, vsprintfand focused on buffer overflow and dangerous printf%nuses. The implementation leverages inline functions and__builtin_object_size(see[PATCH] Object size checking to prevent (some) buffer overflows). More functions were added over time and__builtin_constant_pwas used as well. As of 2022-11 glibc
...
继续阅读
(69)