From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3D13DEC8738 for ; Thu, 7 Sep 2023 16:16:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238257AbjIGQQU (ORCPT ); Thu, 7 Sep 2023 12:16:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36862 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240851AbjIGQP6 (ORCPT ); Thu, 7 Sep 2023 12:15:58 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4D1F493FE for ; Thu, 7 Sep 2023 09:14:22 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BCB4CC36AF1; Thu, 7 Sep 2023 14:50:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1694098239; bh=+gO7O6tHf+BV9PIKE7c/h7YCFsv3vVrvtAyihjc2yNA=; h=Date:From:To:Subject:In-Reply-To:References:Cc:From; b=c9FmK49Q20pe55+Zb+EyNBOOge1ZRdMtE+UZj5GKYjA5phs1JzDOamw0Ac00GTb1T QkOeqd3TaSQ8tzl71GBnIQK2Fy1M8hTxzQ8wrrGr9F6NL0Yraybq8LMBn8bU9Op+Ik mdo6GrXbpcklesT7ZhSMzegeRn64/Wk4JARtFNkxJtn++wq1hKqBmWUaE9pxyN/W2/ DaLTT2r3UlWi9Ux7VKuFpo1MeB0GifymRATRpoRspvzk+tzQXr/5UKfqEoj40qbuNu DOoqxw/BtshCVn21OJzC/2+DytDMUY6KzelYqOLwQFZuIpovZ7wmzMTftIWwtb+meA 3grjwpB8jbXew== Message-ID: <8708c8beff5669e772a8d2e0dd76c9e3.mripard@kernel.org> Date: Thu, 07 Sep 2023 14:50:36 +0000 From: "Maxime Ripard" To: =?utf-8?b?VGhvbWFzIEhlbGxzdHLDtm0=?= Subject: Re: [PATCH v3 1/2] drm/tests: helpers: Avoid a driver uaf In-Reply-To: <20230907135339.7971-2-thomas.hellstrom@linux.intel.com> References: <20230907135339.7971-2-thomas.hellstrom@linux.intel.com> Cc: dri-devel@lists.freedesktop.org, intel-xe@lists.freedesktop.org, stable@vger.kernel.org, "Daniel Vetter" , "David Airlie" , "Maarten Lankhorst" , "Maxime Ripard" , "Thomas Zimmermann" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org On Thu, 7 Sep 2023 15:53:38 +0200, Thomas Hellstr=C3=B6m wrote: > when using __drm_kunit_helper_alloc_drm_device() the driver may be > dereferenced by device-managed resources up until the device is > freed, which is typically later than the kunit-managed resource code > frees it. Fix this by simply make the driver device-managed as well. >=20 >=20 > [ ... ] Acked-by: Maxime Ripard Thanks! Maxime