Bug 1579739 - glibc: Fix stack overflow with huge PT_NOTE segment
Summary: glibc: Fix stack overflow with huge PT_NOTE segment
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: glibc
Version: 7.5
Hardware: All
OS: Linux
Target Milestone: rc
: ---
Assignee: Florian Weimer
QA Contact: qe-baseos-tools
Keywords: Patch
Depends On:
Blocks: 1655768
TreeView+ depends on / blocked
Reported: 2018-05-18 08:36 UTC by Florian Weimer
Modified: 2019-06-10 12:03 UTC (History)
8 users (show)

Clone Of:
Last Closed:

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
Sourceware 20419 None None None 2019-06-10 10:29 UTC

Description Florian Weimer 2018-05-18 08:36:01 UTC
Certain Rust binaries used to trigger this (but Rust has since installed a workaround).  Upstream fix:

Upstream fix:

commit 0065aaaaae51cd60210ec3a7e13dddd8e01ffe2c
Author: Paul Pluzhnikov <ppluzhnikov@google.com>
Date:   Sat May 5 18:08:27 2018 -0700

    Fix BZ 20419.  A PT_NOTE in a binary could be arbitratily large, so using
    alloca for it may cause stack overflow.  If the note is larger than
    __MAX_ALLOCA_CUTOFF, use dynamically allocated memory to read it in.

Comment 3 Florian Weimer 2019-03-01 14:30:27 UTC
Note to QE: The test case needs improvement, and I posted a patch upstream:


I will backport this test adjustment once it has been approved upstream.

Comment 4 Florian Weimer 2019-03-01 18:08:52 UTC
glibc-2.17-283.el7 has the test improvement from upstream.

Comment 6 Sergey Kolosov 2019-06-10 12:03:50 UTC
Verified with elf/tst-big-note glibc test case.

Note You need to log in before you can comment on or make changes to this bug.