Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp134372imm; Mon, 4 Jun 2018 14:29:25 -0700 (PDT) X-Google-Smtp-Source: ADUXVKL/RPz8gph9GZA78FzuJgEgb6sCvHmMievlyzYpOZfVQkV/+ALkEOYsmpZXc07IbeN3RUrY X-Received: by 2002:a17:902:189:: with SMTP id b9-v6mr23645518plb.204.1528147765650; Mon, 04 Jun 2018 14:29:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528147765; cv=none; d=google.com; s=arc-20160816; b=JK1DcvIrNNNvPOLddz8VvnT1tkmBy/Co+XuR/M5o3LdGRMzhwXHb53mf6+smxb4y/d m+jD4vYaYLsx/0hEoE9GmB/BCP7R8A/ysdJ0j6ZoCGvmFaD1yNoJAF2KWKLWVinY+YFA lGf3eDwPUpfC7C6x6KZ0gF2D1Q8tsKZK79IUEx69h/Z8cRDJSpMogJ+2nFN0nDfHD1Ai LsJRTSdPiIB9je5p7tk52h4sgjue8aCM/6bNBS6LmDfHLa0QmHnQCrbfs1D2fuvEYXuy dEYWeYvlNLEAIDjtW5KSkFMDf+8e4MhgHA81NIQ69RH9t7w3N8/Pa0jJZ5uJ4VJfzhOb 8xuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=Hk2ffYnqTjizPTPz4+65pVxaFdfgJpZNphYEjxsR42Y=; b=LBR19eUf0U8kNiBJ1w2UcG0KwYWYqE9DBCINESv2zqSK+WqfiGO2I3rW8dimL0HNO/ LC7fVgLg8imwoCOeefPBhSBQAhG4AAtA/nsjkEwPRMEW5GXTfMjs1ZLCBarKfiCchR7R G/pyR4/CsxtVRi0pTF1MrWqUr6y3TjJHmPfZwikUoj08rcRz3pms7AN7d/xMMqKM2Ev4 cdITh6hZ7jdnG9twBnCyo+VI2sSzPIzHzK3XOPZTo7bzjdpNtM9aOBxJJtzkpwN2dZeW XamS6DnBlADC8raeam74M8cti+rLUd1qTSIi0u4PE46FP/1SWpVDc1fW+fM4drEgaIqv FTbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=bGDAFu3x; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f10-v6si24830925pga.219.2018.06.04.14.29.10; Mon, 04 Jun 2018 14:29:25 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=bGDAFu3x; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751243AbeFDV1J (ORCPT + 99 others); Mon, 4 Jun 2018 17:27:09 -0400 Received: from mail-yw0-f196.google.com ([209.85.161.196]:37771 "EHLO mail-yw0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750997AbeFDV1H (ORCPT ); Mon, 4 Jun 2018 17:27:07 -0400 Received: by mail-yw0-f196.google.com with SMTP id j190-v6so50629ywe.4; Mon, 04 Jun 2018 14:27:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=Hk2ffYnqTjizPTPz4+65pVxaFdfgJpZNphYEjxsR42Y=; b=bGDAFu3x1NSpFH5VDVHaG7B0OxdZAq2w7Llt+N/2nygyAubP5pjLqofNJym771xjft lDvQweAoAjHekg5WUslpR5dhcAjd9zmJ/eRkY3svTrp1ofRbntr3gS3BVj7pobV73XCx B8d1NY2IkJ3S5VkRybt9gyo14gE7cmTQQ3VcQkRr0mSyV4tdYIyaQ7sxULZsRRPaTqM5 nDFe9CiY/vzMslprXJmsN9BBEtgsLlu0zkqVYz5+ydyPYS7ct9B7vnSSJAi3gNryT37Z lHIyUeZ2sROpwGgCPtpbDiZ114UJQQQ3VrYo/31GcSu/7L4rnlmTIwyr6BwYp2ca3vhP wLdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=Hk2ffYnqTjizPTPz4+65pVxaFdfgJpZNphYEjxsR42Y=; b=j0dFKJfE2MpYUq3ADhl98nc3ezMj3/pzrOMKd2H+tWIbzeUHLd2MOEWu2bML//2fQw 4CKFlW0xGKOGF7Z/O2vncCe2HY8QmSd7aT0UQTBGjdwX67icFj9zrwz7SAIOV0XM1nWP l0OQ5uStLi5uRW8ycqvExq81F/xvtuLggTXPVGdi3vH1wia2WJslqI5i+9PRU5Df2ZI0 W1Y29PEEmeaJMqLzGF8g04ufP8eNFclyydOmDABb7cYpon8lGh0+sdKos10By08gNCBH pRx7xWAqmKkXqBTxWprYN7P2tLo3qQUwbGb8iL1iUFXVNsBskFyevR0qoAxPO0IqqvVM 1OiA== X-Gm-Message-State: ALKqPwf0P6KdpxldrrK5SbBLYMJXFp+9hN44U9YFryzJuF7lcFQziZoq aNE1EqNvf3OLsxBPWJgBCPE= X-Received: by 2002:a0d:d64c:: with SMTP id y73-v6mr11741581ywd.427.1528147627075; Mon, 04 Jun 2018 14:27:07 -0700 (PDT) Received: from localhost ([2620:10d:c091:180::1:da82]) by smtp.gmail.com with ESMTPSA id c68-v6sm843840ywc.95.2018.06.04.14.27.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 04 Jun 2018 14:27:06 -0700 (PDT) Date: Mon, 4 Jun 2018 14:27:04 -0700 From: Tejun Heo To: Casey Schaufler Cc: "linux-security-module@vger.kernel.org" , chandan.vn@samsung.com, "gregkh@linuxfoundation.org" , "bfields@fieldses.org" , "jlayton@kernel.org" , "linux-kernel@vger.kernel.org" , "linux-nfs@vger.kernel.org" , CPGS , Sireesha Talluri , Chris Wright Subject: Re: [PATCH] Smack: Fix memory leak in smack_inode_getsecctx Message-ID: <20180604212704.GC1351649@devbig577.frc2.facebook.com> References: <1527758911-18610-1-git-send-email-chandan.vn@samsung.com> <20180531153943.GR1351649@devbig577.frc2.facebook.com> <4f00f9ae-3302-83b9-c083-d21ade380eb2@schaufler-ca.com> <20180531161107.GV1351649@devbig577.frc2.facebook.com> <20180601085609epcms5p5fefac0156a4816e9e48751211ab595ee@epcms5p5> <20180601162913epcms5p7737f5b4376d8865af1eae119aa866550@epcms5p7> <5b0b157a-0e8c-d8f5-901e-836d545a8e4c@schaufler-ca.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 04, 2018 at 02:01:34PM -0700, Casey Schaufler wrote: > On 6/1/2018 10:45 AM, Casey Schaufler wrote: > > Fix memory leak in smack_inode_getsecctx > > > > The implementation of smack_inode_getsecctx() made > > incorrect assumptions about how Smack presents a security > > context. Smack does not need to allocate memory to support > > security contexts, so "releasing" a Smack context is a no-op. > > The code made an unnecessary copy and returned that as a > > context, which was never freed. The revised implementation > > returns the context correctly. > > > > Signed-off-by: Casey Schaufler > > Tejun, does this pass your tests? Oh, I'm not the one who reported. Chandan? -- tejun