REDHAT-BUG-1324759: Medium severity GNU gcc vulnerability

Published Apr 7, 2016
·
Updated

It was reported that targets that use libssp for SSP (e.g. newlib, Cygwin, RTEMS, MinGW, but not e.g. Glibc, Bionic, NetBSD which provide SSP in libc) are mistakenly missing out on -DFORTIFYSOURCE functionality even when explicitly specified. The problem is in gcc libssp/Makefile.am:

libsubincludedir = $(libdir)/gcc/$(targetnoncanonical)/$(gccversion)/include nobaselibsubincludeHEADERS = ssp/ssp.h ssp/string.h ssp/stdio.h ssp/unistd.h

Headers are structured so that they should be in $(libsubincludedir), instead of $(libsubincludedir)/ssp where they are currently placed.

Demonstration:

$ cat fortifytest.c / example from https://gcc.gnu.org/bugzilla/showbug.cgi?id=50460 [Open URL] / #include <stdio.h> #include <string.h>

const char str1 = "JIHGFEDCBA";

int main () { struct A { char buf1[9]; char buf2[1]; } a; strcpy (a.buf1 + (0 + 4), str1 + 5); printf("%s %s\n", a.buf1, a.buf2); return 0; }

$ gcc -DFORTIFYSOURCE=2 -fstack-protector-strong -o fortifytest -O2 fortifytest.c $ nm -C fortifytest | grep strcpy U strcpychk@@GLIBC2.3.4

$ i686-w64-mingw32-gcc -DFORTIFYSOURCE=2 -fstack-protector-strong -o fortifytest.exe -O2 fortifytest.c $ i686-w64-mingw32-nm -C fortifytest.exe | grep strcpy 004061e8 I impstrcpy 00402624 T strcpy

If headers are moved, we can see:

$ i686-w64-mingw32-gcc -DFORTIFYSOURCE=2 -fstack-protector-strong -o fortifytest.exe -O2 fortifytest.c $ i686-w64-mingw32-nm -C fortifytest.exe | grep strcpy 00406200 I impstrcpychk 00401590 T strcpychk

Affected Software

1 affected component
GNU gcc

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Configuration

    Move ssp/ssp.h, ssp/string.h, ssp/stdio.h, and ssp/unistd.h from $(libsubincludedir)/ssp into $(libsubincludedir).

    GCC libssp Header installation path = $(libsubincludedir)

Event History

Apr 7, 2016
Data Sourced
via Red Hat·08:33 AM
DescriptionSeverityAffected Software

Frequently Asked Questions

1

What is the severity of REDHAT-BUG-1324759?

The severity of REDHAT-BUG-1324759 is considered medium due to the potential oversight of critical security features.

2

How do I fix REDHAT-BUG-1324759?

To fix REDHAT-BUG-1324759, update to the latest version of the affected libssp package that includes the corrected Makefile configurations.

3

What systems are affected by REDHAT-BUG-1324759?

The systems affected by REDHAT-BUG-1324759 include those using GCC libssp, newlib, Cygwin, RTEMS, and MinGW.

4

What impact does REDHAT-BUG-1324759 have on applications?

REDHAT-BUG-1324759 may lead to applications unintentionally lacking expected hardening features, making them more vulnerable to buffer overflow attacks.

5

Is REDHAT-BUG-1324759 being actively addressed by the developers?

Yes, developers are actively addressing REDHAT-BUG-1324759 and will provide updates in future releases to remedy the issue.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203