From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751501AbdFFTlQ (ORCPT ); Tue, 6 Jun 2017 15:41:16 -0400 Received: from mx2.suse.de ([195.135.220.15]:59125 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751445AbdFFTkg (ORCPT ); Tue, 6 Jun 2017 15:40:36 -0400 Subject: Re: [PATCH 00/26] Fixing wait, exit, ptrace, exec, and CLONE_THREAD To: "Eric W. Biederman" , linux-kernel@vger.kernel.org Cc: Kees Cook , Roland McGrath , linux-api@vger.kernel.org, Linux Containers , Oleg Nesterov , David Howells , Al Viro , Thomas Gleixner , Linus Torvalds , Ingo Molnar , "Michael Kerrisk (man-pages)" References: <877f0pym71.fsf@xmission.com> From: Aleksa Sarai Message-ID: Date: Wed, 7 Jun 2017 05:40:21 +1000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <877f0pym71.fsf@xmission.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > Another easy entry point is to see that a multi-threaded setuid won't > change the credentials on a zombie thread group leader. Which can allow > sending signals to a process that the credential change should forbid. > This is in violation of posix and the semantics we attempt to enforce in > linux. I might be completely wrong on this point (and I haven't looked at the patches), but I was under the impression that multi-threaded set[ug]id was implemented in userspace (by glibc's nptl(7) library that uses RT signals internally to get each thread to update their credentials). And given that, I wouldn't be surprised (as a user) that zombie threads will have stale credentials (glibc isn't running in those threads anymore). Am I mistaken in that belief? -- Aleksa Sarai Software Engineer (Containers) SUSE Linux GmbH https://www.cyphar.com/