Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1572381rwd; Wed, 31 May 2023 16:16:32 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4/m99dFmlcQSe/5qYk3x/ie9mWYPzy8rCImKh4yR0XajaDuTwn1hnVyvU+FZQTM6KV/3cu X-Received: by 2002:a17:90a:1906:b0:256:9b5c:2aa2 with SMTP id 6-20020a17090a190600b002569b5c2aa2mr62137pjg.6.1685574991738; Wed, 31 May 2023 16:16:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685574991; cv=none; d=google.com; s=arc-20160816; b=jn8nU62WCBMuOpbI7AuDqiDZX82OWGsf8W3CWlbJH2C5KMAtqmkwC0ZHWTLYFbHByx mE49BjuJGUad2Dq5u4cU2XCp6a5fGAab70uvZ1FVp5hfktZiH/gxWVo8Q4CCVJWMFApa MD3mzNJU7oCOUhCUT7p55e54lBBH6ImbVgpVEI7xxmnS5Ld1Xegxrpfj3EiYvQpVBm38 CriXir6RJjaoDk3wVJQsge9wFykhXfz3Ej1oUWtTuWiqdDZYO86krbVCtR9mQ2zpLA4O MoBG9oEj4zcJUsxb4U50qYsYZnBsBClblD4gf96oQv9kTEX1m9XRbzLL7CM7UI0bVriw B5Mg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:dlp-filter:cms-type:content-language :thread-index:content-transfer-encoding:mime-version:message-id:date :subject:in-reply-to:cc:to:from:dkim-signature:dkim-filter; bh=CTOpbPdXYysEtpCs4gWVoYgDgVpfgPPrpQs91DbH0iI=; b=Yj1rckeP5djpFIDxMnd5/es5O5yc54lpHIvDdhRILb7OpIiKsE6XTVbtIUUfbSbN7o 9i0c0Q7s4ZDWS1qrjIcJlQe0UnTD1IhRQj99LeT7xjz9PaU2fP96jtYt4QtrLeXdDTK6 QkZz4qzDDC/OLLfdOcBRy3TNNBPPwwymzj6SvYFSG8IL6UjmFvrlCbOgtUeXyYr3TOR4 Rysl5hIyw1gGgadSALvdXmUSkd+NxNe7uIS2HqXKzbL2/P1RQECmqV9TsAVA6BVurM5l JHuL16bGLrex5ICLGcBiMBDy6poDUleFIVhyITe4eBEKwZhJ6i34v0EVDa04fmvliNR7 DTuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b="Y/dJiI+g"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 59-20020a17090a0fc100b0024e1ae3fb36si85136pjz.128.2023.05.31.16.16.16; Wed, 31 May 2023 16:16:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b="Y/dJiI+g"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S229724AbjEaW4I (ORCPT + 99 others); Wed, 31 May 2023 18:56:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59708 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229781AbjEaW4H (ORCPT ); Wed, 31 May 2023 18:56:07 -0400 Received: from mailout2.samsung.com (mailout2.samsung.com [203.254.224.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4B6F69F for ; Wed, 31 May 2023 15:56:02 -0700 (PDT) Received: from epcas1p4.samsung.com (unknown [182.195.41.48]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20230531225558epoutp0246c90e33d1490821f0254bdb3aac02d8~kXGco9JPh2077920779epoutp02i for ; Wed, 31 May 2023 22:55:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20230531225558epoutp0246c90e33d1490821f0254bdb3aac02d8~kXGco9JPh2077920779epoutp02i DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1685573758; bh=CTOpbPdXYysEtpCs4gWVoYgDgVpfgPPrpQs91DbH0iI=; h=From:To:Cc:In-Reply-To:Subject:Date:References:From; b=Y/dJiI+g96vBxZEKw3YQtjcA3sfkV2BOo+MwF6uYoN/oOwNr/vZWrcHf/MdKpkF0G 1kP0KT+KnZI//BA2s0apGWo6BX4dKECH/6Hq83Trlvpai8XaEW0qEcylizm/ZjKuht UVUUKyneJ2MqFOcVSuoy02vMBxD3Ygv/69LqDlQI= Received: from epsnrtp3.localdomain (unknown [182.195.42.164]) by epcas1p4.samsung.com (KnoxPortal) with ESMTP id 20230531225558epcas1p4155c2c22920769a6f44436a43f260cf9~kXGcHSP3S2641826418epcas1p45; Wed, 31 May 2023 22:55:58 +0000 (GMT) Received: from epsmges1p1.samsung.com (unknown [182.195.36.135]) by epsnrtp3.localdomain (Postfix) with ESMTP id 4QWl3x0myBz4x9Pt; Wed, 31 May 2023 22:55:57 +0000 (GMT) Received: from epcas1p1.samsung.com ( [182.195.41.45]) by epsmges1p1.samsung.com (Symantec Messaging Gateway) with SMTP id 35.91.48828.C70D7746; Thu, 1 Jun 2023 07:55:56 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas1p3.samsung.com (KnoxPortal) with ESMTPA id 20230531225556epcas1p370c3dcbb880ff8d0f45db79dcfba4a0c~kXGad6TC-1549515495epcas1p3O; Wed, 31 May 2023 22:55:56 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20230531225556epsmtrp111dc17d7dbad2f42747daab4a04c9bca~kXGacsxdC2798827988epsmtrp1V; Wed, 31 May 2023 22:55:56 +0000 (GMT) X-AuditID: b6c32a35-93bfa7000000bebc-e3-6477d07c59f3 Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 45.A9.27706.C70D7746; Thu, 1 Jun 2023 07:55:56 +0900 (KST) Received: from inkidae001 (unknown [10.113.221.213]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20230531225556epsmtip2ab4998575f6db55d69e76be758c85a2b~kXGaNXWpM1797217972epsmtip2R; Wed, 31 May 2023 22:55:56 +0000 (GMT) From: =?utf-8?B?64yA7J246riwL1RpemVuIFBsYXRmb3JtIExhYihTUikv7IK87ISx7KCE7J6Q?= To: "'Andi Shyti'" , "'lm0963'" Cc: , , , , , , , , , In-Reply-To: <20230531120531.dynd3iyggauucly7@intel.intel> Subject: RE: [PATCH] drm/exynos: fix race condition UAF in exynos_g2d_exec_ioctl Date: Thu, 1 Jun 2023 07:55:55 +0900 Message-ID: <007001d99413$0f08ba60$2d1a2f20$@samsung.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQGTj1Ryyv7UvGCwDbo/bVuHx7F6MwGboBvXA23aa5ECFYZTkQHsjiyBAkvDF18C1e4e+K+PmWwQ Content-Language: ko X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrAJsWRmVeSWpSXmKPExsWy7bCmrm7NhfIUg+7tVhYnri9isngwbxub xf2vHYwW/7dNZLa48vU9m8Xe11vZLc42vWG32PT4GqvF5V1z2CxmnN/HZHF8egOTxYzJL9kc eDz2flvA4rFz1l12j02rOtk87lzbw+Zxv/s4k8fmJfUefVtWMXp83iQXwBGVbZORmpiSWqSQ mpecn5KZl26r5B0c7xxvamZgqGtoaWGupJCXmJtq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556epcas1p370c3dcbb880ff8d0f45db79dcfba4a0c X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-Sendblock-Type: SVC_REQ_APPROVE CMS-TYPE: 101P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20230531120656epcas1p1df61dae784f4b6833b39c43da697be08 References: <20230526130131.16521-1-lm0963hack@gmail.com> <20230530222150.24oogloda6wtvpvm@intel.intel> <20230531081917.grx3qqqm7usaqoa5@intel.intel> <20230531120531.dynd3iyggauucly7@intel.intel> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Andi, > -----Original Message----- > From: Andi Shyti > Sent: Wednesday, May 31, 2023 9:06 PM > To: lm0963 > Cc: inki.dae=40samsung.com; sw0312.kim=40samsung.com; > kyungmin.park=40samsung.com; airlied=40gmail.com; daniel=40ffwll.ch; > krzysztof.kozlowski=40linaro.org; alim.akhtar=40samsung.com; dri- > devel=40lists.freedesktop.org; linux-arm-kernel=40lists.infradead.org; li= nux- > samsung-soc=40vger.kernel.org; linux-kernel=40vger.kernel.org > Subject: Re: =5BPATCH=5D drm/exynos: fix race condition UAF in > exynos_g2d_exec_ioctl >=20 > Hi Min, >=20 > On Wed, May 31, 2023 at 06:54:34PM +0800, lm0963 wrote: > > Hi Andi, > > > > On Wed, May 31, 2023 at 4:19=E2=80=AFPM=20Andi=20Shyti=20=20wrote:=0D=0A>=20>=20>=0D=0A>=20>=20>=20Hi=20Min,=0D=0A>=20>= =20>=0D=0A>=20>=20>=20>=20>=20>=20If=20it=20is=20async,=20runqueue_node=20i= s=20freed=20in=20g2d_runqueue_worker=20on=0D=0A>=20another=0D=0A>=20>=20>= =20>=20>=20>=20worker=20thread.=20So=20in=20extreme=20cases,=20if=20g2d_run= queue_worker=20runs=0D=0A>=20first,=20and=0D=0A>=20>=20>=20>=20>=20>=20then= =20executes=20the=20following=20if=20statement,=20there=20will=20be=20use-= =0D=0A>=20after-free.=0D=0A>=20>=20>=20>=20>=20>=0D=0A>=20>=20>=20>=20>=20>= =20Signed-off-by:=20Min=20Li=20=0D=0A>=20>=20>=20>= =20>=20>=20---=0D=0A>=20>=20>=20>=20>=20>=20=20drivers/gpu/drm/exynos/exyno= s_drm_g2d.c=20=7C=202=20+-=0D=0A>=20>=20>=20>=20>=20>=20=201=20file=20chang= ed,=201=20insertion(+),=201=20deletion(-)=0D=0A>=20>=20>=20>=20>=20>=0D=0A>= =20>=20>=20>=20>=20>=20diff=20--git=20a/drivers/gpu/drm/exynos/exynos_drm_g= 2d.c=0D=0A>=20b/drivers/gpu/drm/exynos/exynos_drm_g2d.c=0D=0A>=20>=20>=20>= =20>=20>=20index=20ec784e58da5c..414e585ec7dd=20100644=0D=0A>=20>=20>=20>= =20>=20>=20---=20a/drivers/gpu/drm/exynos/exynos_drm_g2d.c=0D=0A>=20>=20>= =20>=20>=20>=20+++=20b/drivers/gpu/drm/exynos/exynos_drm_g2d.c=0D=0A>=20>= =20>=20>=20>=20>=20=40=40=20-1335,7=20+1335,7=20=40=40=20int=20exynos_g2d_e= xec_ioctl(struct=0D=0A>=20drm_device=20*drm_dev,=20void=20*data,=0D=0A>=20>= =20>=20>=20>=20>=20=20=20=20=20=20=20/*=20Let=20the=20runqueue=20know=20tha= t=20there=20is=20work=20to=20do.=20*/=0D=0A>=20>=20>=20>=20>=20>=20=20=20= =20=20=20=20queue_work(g2d->g2d_workq,=20&g2d->runqueue_work);=0D=0A>=20>= =20>=20>=20>=20>=0D=0A>=20>=20>=20>=20>=20>=20-=20=20=20=20=20if=20(runqueu= e_node->async)=0D=0A>=20>=20>=20>=20>=20>=20+=20=20=20=20=20if=20(req->asyn= c)=0D=0A>=20>=20>=20>=20>=0D=0A>=20>=20>=20>=20>=20did=20you=20actually=20h= it=20this?=20If=20you=20did,=20then=20the=20fix=20is=20not=20OK.=0D=0A>=20>= =20>=20>=0D=0A>=20>=20>=20>=20No,=20I=20didn't=20actually=20hit=20this.=20I= =20found=20it=20through=20code=20review.=20This=0D=0A>=20>=20>=20>=20is=20o= nly=20a=20theoretical=20issue=20that=20can=20only=20be=20triggered=20in=20e= xtreme=0D=0A>=20>=20>=20>=20cases.=0D=0A>=20>=20>=0D=0A>=20>=20>=20first=20= of=20all=20runqueue=20is=20used=20again=20two=20lines=20below=20this,=20whi= ch=0D=0A>=20>=20>=20means=20that=20if=20you=20don't=20hit=20the=20uaf=20her= e=20you=20will=20hit=20it=0D=0A>=20>=20>=20immediately=20after.=0D=0A>=20>= =0D=0A>=20>=20No,=20if=20async=20is=20true,=20then=20it=20will=20goto=20out= ,=20which=20will=20directly=20return.=0D=0A>=20>=0D=0A>=20>=20if=20(runqueu= e_node->async)=0D=0A>=20>=20=20=20=20=20goto=20out;=20=20=20//=20here,=20go= =20to=20out,=20will=20directly=20return=0D=0A>=20>=0D=0A>=20>=20wait_for_co= mpletion(&runqueue_node->complete);=20=20=20=20=20=20//=20not=20hit=0D=0A>= =20>=20g2d_free_runqueue_node(g2d,=20runqueue_node);=0D=0A>=20>=0D=0A>=20>= =20out:=0D=0A>=20>=20return=200;=0D=0A>=20=0D=0A>=20that's=20right,=20sorry= ,=20I=20misread=20it.=0D=0A>=20=0D=0A>=20>=20>=20Second,=20if=20runqueue=20= is=20freed,=20than=20we=20need=20to=20remove=20the=20part=0D=0A>=20>=20>=20= where=20it's=20freed=20because=20it=20doesn't=20make=20sense=20to=20free=20= runqueue=0D=0A>=20>=20>=20at=20this=20stage.=0D=0A>=20>=0D=0A>=20>=20It=20i= s=20freed=20by=20g2d_free_runqueue_node=20in=20g2d_runqueue_worker=0D=0A>= =20>=0D=0A>=20>=20static=20void=20g2d_runqueue_worker(struct=20work_struct= =20*work)=0D=0A>=20>=20=7B=0D=0A>=20>=20=20=20=20=20......=0D=0A>=20>=20=20= =20=20=20if=20(runqueue_node)=20=7B=0D=0A>=20>=20=20=20=20=20=20=20=20=20pm= _runtime_mark_last_busy(g2d->dev);=0D=0A>=20>=20=20=20=20=20=20=20=20=20pm_= runtime_put_autosuspend(g2d->dev);=0D=0A>=20>=0D=0A>=20>=20=20=20=20=20=20= =20=20=20complete(&runqueue_node->complete);=0D=0A>=20>=20=20=20=20=20=20= =20=20=20if=20(runqueue_node->async)=0D=0A>=20>=20=20=20=20=20=20=20=20=20= =20=20=20=20g2d_free_runqueue_node(g2d,=20runqueue_node);=20=20=20=20=20=20= =20=20//=20freed=20here=0D=0A>=20=0D=0A>=20this=20is=20what=20I'm=20wonderi= ng:=20is=20it=20correct=20to=20free=20a=20resource=0D=0A>=20here?=20The=20d= esign=20looks=20to=20me=20a=20bit=20fragile=20and=20prone=20to=20mistakes.= =0D=0A=0D=0AThis=20question=20seems=20to=20deviate=20from=20the=20purpose= =20of=20this=20patch.=20If=20you=20are=20providing=20additional=20opinions= =20for=20code=20quality=20improvement=20unrelated=20to=20this=20patch,=20it= =20would=20be=20more=20appropriate=20for=20me=20to=20answer=20instead=20of= =20him.=0D=0A=0D=0AThe=20runqueue=20node=20-=20which=20contains=20command= =20list=20for=20g2d=20rendering=20-=20is=20generated=20when=20the=20user=20= calls=20the=20ioctl=20system=20call.=20Therefore,=20if=20the=20user-request= ed=20command=20list=20is=20rendered=20by=20g2d=20device=20then=20there=20is= =20no=20longer=20a=20reason=20to=20keep=20it.=20:)=0D=0A=0D=0A>=20=0D=0A>= =20The=20patch=20per=20se=20is=20OK.=20It=20doesn't=20make=20much=20differe= nce=20to=20me=0D=0A>=20where=20you=20actually=20read=20async,=20although=20= this=20patch=20looks=20a=20bit=0D=0A>=20safer:=0D=0A>=20=0D=0A>=20Reviewed-= by:=20Andi=20Shyti=20=0D=0A=0D=0AThanks,=0D=0AInki= =20Dae=0D=0A=0D=0A>=20=0D=0A>=20However=20some=20refactoring=20might=20be= =20needed=20to=20make=20it=20a=20bit=20more=0D=0A>=20robust.=0D=0A>=20=0D= =0A>=20Thanks,=0D=0A>=20Andi=0D=0A>=20=0D=0A>=20>=20=20=20=20=20=7D=0D=0A>= =20>=0D=0A>=20>=20>=0D=0A>=20>=20>=20Finally,=20can=20you=20elaborate=20on= =20the=20code=20review=20that=20you=20did=20so=0D=0A>=20>=20>=20that=20we= =20all=20understand=20it?=0D=0A>=20>=0D=0A>=20>=20queue_work(g2d->g2d_workq= ,=20&g2d->runqueue_work);=0D=0A>=20>=20msleep(100);=20=20=20=20=20=20=20=20= //=20add=20sleep=20here=20to=20let=20g2d_runqueue_worker=20run=20first=0D= =0A>=20>=20if=20(runqueue_node->async)=0D=0A>=20>=20=20=20=20=20goto=20out;= =0D=0A>=20>=0D=0A>=20>=0D=0A>=20>=20>=0D=0A>=20>=20>=20Andi=0D=0A>=20>=0D= =0A>=20>=0D=0A>=20>=0D=0A>=20>=20--=0D=0A>=20>=20Min=20Li=0D=0A=0D=0A