From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19687 invoked by alias); 11 Oct 2011 08:36:25 -0000 Received: (qmail 19185 invoked by uid 22791); 11 Oct 2011 08:36:22 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,TW_RG X-Spam-Check-By: sourceware.org Received: from localhost (HELO sourceware.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 11 Oct 2011 08:36:04 +0000 From: "sdrake at xnet dot co.nz" To: glibc-bugs@sources.redhat.com Subject: [Bug libc/13280] New: execve(2) does not honor sysconf(_SC_ARG_MAX) in some cases. Date: Tue, 11 Oct 2011 08:36:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: libc X-Bugzilla-Keywords: X-Bugzilla-Severity: critical X-Bugzilla-Who: sdrake at xnet dot co.nz X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: drepper.fsp at gmail dot com X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Flags Message-ID: X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 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 X-SW-Source: 2011-10/txt/msg00057.txt.bz2 http://sourceware.org/bugzilla/show_bug.cgi?id=13280 Bug #: 13280 Summary: execve(2) does not honor sysconf(_SC_ARG_MAX) in some cases. Product: glibc Version: 2.13 Status: NEW Severity: critical Priority: P2 Component: libc AssignedTo: drepper.fsp@gmail.com ReportedBy: sdrake@xnet.co.nz Classification: Unclassified Host: x86_64-unknown-linux-gnu Steven Drake changed: What |Removed |Added ---------------------------------------------------------------------------- Flags| |testsuite+ Created attachment 5974 --> http://sourceware.org/bugzilla/attachment.cgi?id=5974 test-skeleton.c based test case (causes execve to fail with E2BIG). If execve is given an argv with a string that is larger than 131072 (coincidentally the ARG_MAX macro from linux/limits.h) but less than what sysconf(_SC_ARG_MAX) return, execve fails with E2BIG. This does not happen if the total length of the argv strings is greater than ARG_MAX but each is shorter. This is a problem if using "/bin/sh -c", i.e. system(3). I'm not sure if this is a glibc or linux issue but I am reporting it here anyway. -- 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.