From mboxrd@z Thu Jan 1 00:00:00 1970 From: jmorris@namei.org (James Morris) Date: Thu, 5 Oct 2017 09:10:58 +1100 (AEDT) Subject: [PATCH] fix security_release_secctx seems broken In-Reply-To: References: Message-ID: To: linux-security-module@vger.kernel.org List-Id: linux-security-module.vger.kernel.org On Wed, 4 Oct 2017, Konstantin Khlebnikov wrote: > Just "getcap /bin/ping" is enough to tigger leak if file has capabilities. > Selinux shouldn't be loaded because its release_secctx hook call kfree. Ahh, makes sense. > > But sometimes it takes some time for kmemleak to find leak. Presumably > because stale poiner stays on stack which could be reused nowdays. Thanks for finding this! -- James Morris -- To unsubscribe from this list: send the line "unsubscribe linux-security-module" in the body of a message to majordomo at vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751223AbdJDWLR (ORCPT ); Wed, 4 Oct 2017 18:11:17 -0400 Received: from namei.org ([65.99.196.166]:51884 "EHLO namei.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750951AbdJDWLP (ORCPT ); Wed, 4 Oct 2017 18:11:15 -0400 Date: Thu, 5 Oct 2017 09:10:58 +1100 (AEDT) From: James Morris To: Konstantin Khlebnikov cc: Casey Schaufler , linux-kernel , Serge Hallyn , James Morris , LSM List , Stephen Smalley Subject: Re: [PATCH] fix security_release_secctx seems broken In-Reply-To: Message-ID: References: User-Agent: Alpine 2.21 (LRH 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 4 Oct 2017, Konstantin Khlebnikov wrote: > Just "getcap /bin/ping" is enough to tigger leak if file has capabilities. > Selinux shouldn't be loaded because its release_secctx hook call kfree. Ahh, makes sense. > > But sometimes it takes some time for kmemleak to find leak. Presumably > because stale poiner stays on stack which could be reused nowdays. Thanks for finding this! -- James Morris