From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24466 invoked by alias); 31 Oct 2013 14:42:17 -0000 Mailing-List: contact glibc-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: glibc-bugs-owner@sourceware.org Received: (qmail 23882 invoked by uid 48); 31 Oct 2013 14:42:10 -0000 From: "neleai at seznam dot cz" To: glibc-bugs@sourceware.org Subject: [Bug malloc/12155] MALLOC_MMAP_THRESHOLD_ and MALLOC_MMAP_MAX_ have different effect for setgid than for setuid programs Date: Thu, 31 Oct 2013 14:42:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: malloc X-Bugzilla-Version: 2.12 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: neleai at seznam dot cz X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-10/txt/msg00384.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=12155 Ondrej Bilka changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |neleai at seznam dot cz --- Comment #6 from Ondrej Bilka --- Weird as these variables are handled by malloc/arena.c: if (! __builtin_expect (__libc_enable_secure, 0)) { if (memcmp (envline, "TRIM_THRESHOLD_", 15) == 0) __libc_mallopt(M_TRIM_THRESHOLD, atoi(&envline[16])); else if (memcmp (envline, "MMAP_THRESHOLD_", 15) == 0) __libc_mallopt(M_MMAP_THRESHOLD, atoi(&envline[16])); } and __libc_enable_secure is defined as if (__libc_enable_secure_decided == 0) __libc_enable_secure = (__geteuid () != __getuid () || __getegid () != __getgid ()); A simple program shows that this is enabled in both cases. extern int __libc_enable_secure; int main () { printf ("%i %i %i %i", getuid(), geteuid(), getgid(), getegid()); printf (" %i", __libc_enable_secure); } -- You are receiving this mail because: You are on the CC list for the bug.