Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp786461imm; Fri, 1 Jun 2018 09:30:09 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJZ0q5KtLZYpEMH4kQsKQ6pvfS3R9oOwL34jHEUhgPr9c7orMXr2NQrA5iOG+f2txqUvT6I X-Received: by 2002:a62:1bc2:: with SMTP id b185-v6mr8082056pfb.225.1527870609821; Fri, 01 Jun 2018 09:30:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527870609; cv=none; d=google.com; s=arc-20160816; b=XXr2itHS87v9gaykT1MQ8Qd5BkyvS+bTutuxupJyeMEsLTJpmaFxMR3NR2e6/IKOKw AOkj+Ff5sNgncixTtQHhaNdz2ODA04GR4uzfP8ZiS4HbltawpohBmBYpC5kBnWwTRNNW si7qWQzqprEOIDPnm4gz3iIRW8/rOvM/SNOz149vRwrKzf/s8ow6QbFrtR/qwnk1uMLy 8bO9FGZiVeM4zcBIte6y2OKrfs69RoLn2Ij/YBliKKbrplHexiAIG0bzIGLF6kJeL9UC deMVDq9HyhftzDModzwKJQOvOz56lVGPhIswsC7R58llmzduLGvMuWGxrcr6I+pNiHfF y6CA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:dlp-filter:cms-type :content-transfer-encoding:date:message-id:in-reply-to:cc:to:from :reply-to:subject:mime-version:dkim-signature:dkim-filter :arc-authentication-results; bh=U3Y6RucUSx6jfyTOEC27gWBHYw/1B+3kyUzOtyqfvtA=; b=QgDH//k8HP4RiX7RWQuf+9905+E7pDzEaRMO0ZjiSZ8sEtYnY/CG5Fj5Q3hT0Sp/HG 7iegAO04rGJspRInRz0mJWZr9pi7d2f0zXA/kkPjjxwRS/YfWdymiAgy0FmX2cKn61Pe dhFseP1SdHohLrjQHK7fsH8nbPqTMNyWU7HSmOSL6uEfm0vQmgmIUBwJPFYwXGVYtjY+ ++aNCvCJUX+VgYE8Dn2MJDjlZT2mB14xYVKpmaXXWvUod+MdurhdQqhoP3cMG3LRwxbc FPc0AG6yslC0qekkckGNs5jYPBQGkjl/AKUrQo8ey0DrBtthjlYX4165qxMOfdtIpI24 ySjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=nfWWPgUn; 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=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d8-v6si31530484pgu.671.2018.06.01.09.29.54; Fri, 01 Jun 2018 09:30:09 -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=pass header.i=@samsung.com header.s=mail20170921 header.b=nfWWPgUn; 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=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753040AbeFAQ3X (ORCPT + 99 others); Fri, 1 Jun 2018 12:29:23 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:20027 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752995AbeFAQ3S (ORCPT ); Fri, 1 Jun 2018 12:29:18 -0400 Received: from epcas5p2.samsung.com (unknown [182.195.41.40]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20180601162916epoutp012158082c1941a54bc5f21adae5fed692~0Fi0GEnVL2430324303epoutp01U for ; Fri, 1 Jun 2018 16:29:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20180601162916epoutp012158082c1941a54bc5f21adae5fed692~0Fi0GEnVL2430324303epoutp01U DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1527870556; bh=U3Y6RucUSx6jfyTOEC27gWBHYw/1B+3kyUzOtyqfvtA=; h=Subject:Reply-To:From:To:CC:In-Reply-To:Date:References:From; b=nfWWPgUnSvOz54vljOUUbuHlAYeBP2A6GlOa1wAkVTj/29qYEzOApbxRebhjv+UQ5 K4hNerxlgDTcHCx1JgChY+hpTvAvDRBTVBWZPWit7P41uyfB1ZqeVfQoc56dF4PyGd pNngGNVEGT3pfa/pw9/yvvVSxFZ4azRJ91WUP4hw= Received: from epsmges5p3new.samsung.com (unknown [182.195.40.193]) by epcas5p2.samsung.com (KnoxPortal) with ESMTP id 20180601162913epcas5p2493e4d35081f7954e6c5abdec56c236f~0Fix2liPM2525025250epcas5p2z; Fri, 1 Jun 2018 16:29:13 +0000 (GMT) X-AuditID: b6c32a4b-9a1ff70000001138-45-5b117459edac Received: from epcas5p4.samsung.com ( [182.195.41.42]) by epsmges5p3new.samsung.com (Symantec Messaging Gateway) with SMTP id 3C.E2.04408.954711B5; Sat, 2 Jun 2018 01:29:13 +0900 (KST) Mime-Version: 1.0 Subject: RE: Re: [PATCH 1/1] Fix memory leak in kernfs_security_xattr_set and kernfs_security_xattr_set Reply-To: chandan.vn@samsung.com From: CHANDAN VN To: "linux-security-module@vger.kernel.org" CC: Tejun Heo , "gregkh@linuxfoundation.org" , "bfields@fieldses.org" , "jlayton@kernel.org" , "linux-kernel@vger.kernel.org" , "linux-nfs@vger.kernel.org" , CPGS , Sireesha Talluri , Chris Wright , Casey Schaufler X-Priority: 3 X-Content-Kind-Code: NORMAL In-Reply-To: <02d9878e-65bf-5de8-9658-cf0f692f358c@schaufler-ca.com> X-Drm-Type: N,general X-Msg-Generator: Mail X-Msg-Type: PERSONAL X-Reply-Demand: N Message-ID: <20180601162913epcms5p7737f5b4376d8865af1eae119aa866550@epcms5p7> Date: Fri, 01 Jun 2018 21:59:13 +0530 X-CMS-MailID: 20180601162913epcms5p7737f5b4376d8865af1eae119aa866550 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" X-CPGSPASS: Y CMS-TYPE: 105P X-Brightmail-Tracker: H4sIAAAAAAAAA02Se0hTURzHOd7t7qqtrtPqtCjWpf7Q2NxdbV7LRaTEDQuMiCirdZmHbeUe 7M5eBK3CHkMjoRejrExN1sNcZmqKYU+Kyp5LInvYw1LL7KVF0b1eR/11Pnz4nvN7cAhMFcLV hMPlQ14Xl0/hcbK6y8kp2qW+hFx9eZuW6dq7jOmo+4kzxU/LMeZ9azKz7Xg1zgxWhhTMg8ZD ONN26Zac6St6hTONbR7m54mrYHY8e3bfVpwNh3bhbMvhUwp2d20IsFdbynC2rimAsV/CE3MU y1CGHXF5yKtBLqs7z+GymansRZZMi9Gkp7V0OpNGaVycE5mprPk52rmOfKFDSrOWyy8QVA7H 81TqrAyvu8CHNHY37zNTuTRt0NH6NJ3BIJzGFTMMRiGyCtl7i1/hntvx64Nba3A/qIgPgFgC ktPhk+YnMpFV5EUAv3+QBwBBKMkE+Ls+UdSJpAO+LHwklyIaeKXntEzyU2Hgcs8Q42QyvFG6 XyFyErkYvg1dBwEQR2DkDQxWhTpwqZYSHtzxRibxeHjhxHkgciyZBU997sIkPxq2n+xVRPnT tSNA4iRY2HF7OJMAXwxeBNF3qk7XDr/phuEH5xRi/5BcDzuax0k6DXa2n4sRWUkugP2RyBDL yCnw7IGPcimeBf1bFooaE8aqPNaNiRoTxqpuTI0276/5pZAiI2Hxr9cxUV9fGuXJ8E93xTCr 4b2H34eZhR8KyzBxIyqyH4M3G97he4Am+G/Rwf8qB/9VPgqwEBiHPLzThnijZ5oLrdPxnJMv cNl0VrczDIb+aUp2PQjfmd8KSAJQI5Q5mQm5Kjm3lt/gbAWQwKgk5ZJ5glLmcRs2Iq/b4i3I R3wrMAorKMHUo61u4de7fBbaaDCZ9Ol64zTGRFNjlQMRMldF2jgfWoOQB3mj92KIWLUfrNn+ qNCeFQ7Nvd6WZ5hZhRT67dZuqyn7TFPn857lk9I3r2s39/6x9tnqOstrMyf0VW/zFv0w3VTP Wf0RspHgs7jUmjHNE5hRDf1HN90Pa/2DdPzA4wZg+TqHKl34rWin5/DdwYGV+2BGyW6+ZlRl xo6SgaZPXFfk3kyzbkxjsoOS8XaOTsG8PPcXGc6k270DAAA= DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20180531092848epcas1p24b638ccd6da00f1e039bdb64de7e1a5b References: <02d9878e-65bf-5de8-9658-cf0f692f358c@schaufler-ca.com> <1ced6bce-92cc-7e0c-fab4-0aaa3d03b82f@schaufler-ca.com> <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> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >>=C2=A0I=C2=A0agree=C2=A0that=C2=A0the=C2=A0fix=C2=A0can=C2=A0be=C2=A0done= =C2=A0simply=C2=A0by=C2=A0using=C2=A0=22false=22=C2=A0for=C2=A0=0D=0A>>=C2= =A0smack_inode_getsecurity(),=C2=A0but=C2=A0what=C2=A0happens=C2=A0with=C2= =A0kernfs_node_setsecdata()=0D=0A>>=C2=A0and=C2=A0smack_inode_notifysecctx(= ).=C2=A0kernfs_node_setsecdata()=C2=A0is=C2=A0probably=C2=A0ignorable=0D=0A= >>=C2=A0but=C2=A0smack_inode_notifysecctx()=C2=A0is=C2=A0sending=C2=A0the= =C2=A0=22ctx=22=C2=A0to=C2=A0smack_inode_setsecurity()=0D=0A>>=C2=A0and=C2= =A0since=C2=A0=22ctx=22=C2=A0would=C2=A0be=C2=A0NULL=C2=A0because=C2=A0we= =C2=A0used=C2=A0=22false=22,=C2=A0smack_inode_setsecurity()=0D=0A>>=C2=A0be= comes=C2=A0dummy.=0D=0A=C2=A0=0D=0A>Thank=C2=A0you=C2=A0for=C2=A0pointing= =C2=A0this=C2=A0out.=C2=A0You're=C2=A0right,=C2=A0there's=C2=A0more=0D=0A>a= t=C2=A0issue=C2=A0here=C2=A0than=C2=A0changing=C2=A0the=C2=A0alloc=C2=A0fla= g=C2=A0will=C2=A0fix.=C2=A0I=C2=A0think=0D=0A>that=C2=A0calling=C2=A0smack_= inode_getsecurity()=C2=A0from=C2=A0smack_inode_getsecctx()=0D=0A>is=C2=A0ma= king=C2=A0the=C2=A0code=C2=A0more=C2=A0complicated=C2=A0than=C2=A0it=C2=A0n= eeds=C2=A0to=C2=A0be.=C2=A0I=C2=A0will=0D=0A>have=C2=A0a=C2=A0patch=C2=A0sh= ortly.=0D=0A=0D=0AIf=20you=20think=20the=20patch=20would=20take=20time=20or= =20is=20complicated,=20I=20suggest=20that=20the=20kfree()=20fix=20should=20= go=0D=0Ato=20fix=20the=20leaks=20for=20now.=C2=A0=0D=0A=C2=A0=0D=0A=C2=A0= =0D=0A=C2=A0