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 nptl/12404] New: pthread_getattr_np reports wrong value for main thread


http://sourceware.org/bugzilla/show_bug.cgi?id=12404

           Summary: pthread_getattr_np reports wrong value for main thread
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: nptl
        AssignedTo: drepper.fsp@gmail.com
        ReportedBy: kumpera@gmail.com


If an application install a guard page on the main thread by mprotect'ng part
of it, pthread_getattr_np will return an invalid stack_size/stackaddr pair.

Part of the problem with this is that stackaddr + stack_size will point to an
unknown memory address and an application that depends on this information to
inspect the stack will suffer from undefined behavior.

The problem comes from the fact that the information from getrlimit
(RLIMIT_STACK) is not checked against the region found in /proc/self/maps.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- 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]