From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11439 invoked by alias); 30 Aug 2013 19:12:55 -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 11347 invoked by uid 48); 30 Aug 2013 19:12:51 -0000 From: "carlos at redhat dot com" To: glibc-bugs@sourceware.org Subject: [Bug libc/12189] __stack_chk_fail should not attempt a backtrace Date: Fri, 30 Aug 2013 19:12:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: libc X-Bugzilla-Version: 2.12 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: carlos at redhat dot com X-Bugzilla-Status: REOPENED X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: 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-08/txt/msg00194.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=12189 --- Comment #8 from Carlos O'Donell --- (In reply to Rich Felker from comment #7) > I would like an even more extreme fix, removing all possibility of output > from __*_chk_fail and having them immediately abort() or similar (but see > the caveats that follow). Once the program state is compromised, any further > execution could turn a DoS vulnerability into a code-execution one. Even > things like the vdso syscall pointer at %gs:whatever should not be trusted > at this point, because you already have evidence that the program state is > compromised; a stack-based buffer overflow on a non-main thread could easily > reach into the TCB. > > In musl, we have an inline function called a_crash() for things like this; > it's defined as __asm__ __volatile__ ("hlt"); on x86 and intended to be > defined analogously on other archs, although right now it's just *(volatile > char *)0=0; on most. We have ABRT_INSTRUCTION in glibc for all targets and we could use it in this case. I don't disagree with your rationale behind why glibc shouldn't print a backtrace, but it still needs a champion to post the patch on libc-alpha and get consensus. It seems like we would likely have 2 or 3 immediate ACKs for this patch. I'm leaving it up to Kees to push it forward. -- You are receiving this mail because: You are on the CC list for the bug.