This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug stdio/24632] New: Old binaries which use freopen with default stdio handles crash


https://sourceware.org/bugzilla/show_bug.cgi?id=24632

            Bug ID: 24632
           Summary: Old binaries which use freopen with default stdio
                    handles crash
           Product: glibc
           Version: 2.30
            Status: NEW
          Severity: minor
          Priority: P3
         Component: stdio
          Assignee: unassigned at sourceware dot org
          Reporter: fweimer at redhat dot com
  Target Milestone: ---
             Flags: security-

Old i386 binaries which use a copy relocation for the backing symbol of
stdin/stdout/stderr (_IO_stdin_, _IO_stdout_, _IO_stderr_) and try to reopen
that handle crash.  With current glibc, this results in “Fatal error: glibc
detected an invalid stdio handle”.  With older versions, the result is a
segmentation fault when the handle is used to call a virtual function (I've
seen a NULL pointer dereference).

gcc 2.7.2.3-7 from Debian <http://snapshot.debian.org/package/gcc/2.7.2.3-7/>
reproduces this when compiling a file which triggers a preprocessor error
(e.g., “#include <does-not-exist>”).  Binaries with wrapper scripts are also
available at <https://pagure.io/glibc/glibc-test-binaries>.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]