public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/28850] New: linux: __get_nprocs_sched reads uninitialized memory from the stack
@ 2022-02-01 21:46 glebfm at altlinux dot org
  2022-02-01 21:46 ` [Bug libc/28850] " glebfm at altlinux dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: glebfm at altlinux dot org @ 2022-02-01 21:46 UTC (permalink / raw)
  To: glibc-bugs

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

            Bug ID: 28850
           Summary: linux: __get_nprocs_sched reads uninitialized memory
                    from the stack
           Product: glibc
           Version: 2.34
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: libc
          Assignee: unassigned at sourceware dot org
          Reporter: glebfm at altlinux dot org
                CC: drepper.fsp at gmail dot com
  Target Milestone: ---

$ cat f.c
#include <stdio.h>
extern int __get_nprocs_sched (void);

int main() {
        printf("%d\n", __get_nprocs_sched());
}
$ gcc -static f.c -o f
$ ./f
828
$ ./f
794
$ nproc
8

sched_getaffinity(2) writes first N bits of cpu_bits array, but the rest of it
is left uninitialized.

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-02-03 12:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-01 21:46 [Bug libc/28850] New: linux: __get_nprocs_sched reads uninitialized memory from the stack glebfm at altlinux dot org
2022-02-01 21:46 ` [Bug libc/28850] " glebfm at altlinux dot org
2022-02-01 22:08 ` adhemerval.zanella at linaro dot org
2022-02-03 12:15 ` ldv at sourceware dot org
2022-02-03 12:22 ` ldv at sourceware dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).