Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp1133776rdb; Tue, 19 Sep 2023 23:56:30 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGZeI/5AUIuOivkcl8gbsVqaQws72pjiOjw33t7g1zcKFBE2S2OdQ7+7/sz/y8dEO7Ihqcp X-Received: by 2002:a17:903:24e:b0:1bc:6799:3f6c with SMTP id j14-20020a170903024e00b001bc67993f6cmr1957407plh.35.1695192989967; Tue, 19 Sep 2023 23:56:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695192989; cv=none; d=google.com; s=arc-20160816; b=Th3l84rx7rvwTdl3qm7FZthq8pqwInbEU1dXulhAppp7NVR0pcmf87SKqk+osd3bjC QF9jILiby6QQZcJ4khXlg/5a6RbV/9UCwnwH+1K3W+sNvuUnpP/WhmHcl178KSi7nL3C EpsADkIxx4zfDWEzIDoDEBYD+P8xlXxfkT1tC/u57FFJpZWbROan84sTBi66MoYPDP+a 9HF1sg6hLtGWX83kggJ6ZwylMQg5SHIpKlPM3caIAAIJty3fmi+KHKSLOA8lawxO78A9 jc5nSdgz3t++GWrYfPZKf3UBN/qdIdGGbg8VdDWoJE/63oysG3bjjNHxLl4Jp3uxU1U1 lVNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:mime-version:date :message-id:dkim-signature; bh=9mRMCdNeMIClcgwmzxOJ8ENSmRcv/FzlQX/oZ6AQwn0=; fh=S3hboSTLf+uuBGzUOf64Rzjq6tNNqsGvt/9RYVucm7w=; b=q3UWqYQE1VJ8OUPbyEb6QNfOosVSd9uVUTFsX67eFkpk0AcaILqJS6i2+R1etLTqlJ +yR3RDHgJIMLz+PhI8T0oFkeGEuom6lEvvrrgJh8WtlWg2SNTaHgD6IWQY/QjlhGQ1vq 5T8r/ljXyc+l8ys8yB0jHzAoKxh3n/eWxB1o3Y725RU7lkhbfYbvG3rYtXcwn8VKqmVd Zgb2PJvc0xBePzSNnqwvuRCr8R6FrGrvAjzt6wsc+BBtb5fH02CaF1HLnYC9Fzk3hvIh 2FyJb5l8/ILKc2bT7hlpP0V4W1OJIEt6ZTS++f9XJsY7VvhS51xKr0902l8jCpMp0E9c bHQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@riseup.net header.s=squak header.b=hdAllFN9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=riseup.net Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id n9-20020a170902e54900b001c5a8815fd7si2000488plf.150.2023.09.19.23.56.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Sep 2023 23:56:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@riseup.net header.s=squak header.b=hdAllFN9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=riseup.net Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 28C8D8304EFB; Tue, 19 Sep 2023 23:54:49 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232447AbjITGyi (ORCPT + 99 others); Wed, 20 Sep 2023 02:54:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58466 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233409AbjITGyh (ORCPT ); Wed, 20 Sep 2023 02:54:37 -0400 Received: from mx0.riseup.net (mx0.riseup.net [198.252.153.6]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E411B125 for ; Tue, 19 Sep 2023 23:54:20 -0700 (PDT) Received: from fews02-sea.riseup.net (fews02-sea-pn.riseup.net [10.0.1.112]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx0.riseup.net (Postfix) with ESMTPS id 4Rr8Qf68G2z9rw4; Wed, 20 Sep 2023 06:54:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1695192859; bh=V8atDNK1E+JZZDisWMyJdt+WViZGxRZeLthL+8kYzIQ=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=hdAllFN9JuRC87+Ed7jTZjPxd+LDBIbDJwf+v0lcxy6TsYvQsavnaz/ccY+uGKo/d h7nc9PwWtbQKa6PYMPmB8mtC9xgKAZBoYjC0NhpUfllTfuPub86YA1BsE/zYkSKCaK VBg56cBZew5lkaCn2pBeIGc8qUCLGCfFs6loYGJ8= X-Riseup-User-ID: 1F06F83D7576BE04B4DB58FA17051608CD162D04D693EEF396E0701C2059C758 Received: from [127.0.0.1] (localhost [127.0.0.1]) by fews02-sea.riseup.net (Postfix) with ESMTPSA id 4Rr8QM6tp0zFqj9; Wed, 20 Sep 2023 06:54:03 +0000 (UTC) Message-ID: <8d346098-a5fa-5e58-2484-3b3a35370619@riseup.net> Date: Wed, 20 Sep 2023 03:54:00 -0300 MIME-Version: 1.0 Subject: Re: [PATCH 3/3] drm/tests: Fix a use-after-free bug in __drm_kunit_helper_alloc_drm_device() To: Maxime Ripard Cc: David Airlie , Daniel Vetter , Javier Martinez Canillas , Brendan Higgins , David Gow , tales.aparecida@gmail.com, andrealmeid@riseup.net, mairacanal@riseup.net, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, kunit-dev@googlegroups.com References: <20230920-kunit-kasan-fixes-v1-0-1a0fc261832d@riseup.net> <20230920-kunit-kasan-fixes-v1-3-1a0fc261832d@riseup.net> <66zj2spgswo2adyhh2xbcefimggiyci2whxjhsygdistyyqvob@rot736yxggcw> Content-Language: en-US From: Arthur Grillo In-Reply-To: <66zj2spgswo2adyhh2xbcefimggiyci2whxjhsygdistyyqvob@rot736yxggcw> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Tue, 19 Sep 2023 23:54:49 -0700 (PDT) On 20/09/23 03:40, Maxime Ripard wrote: > Hi, > > On Wed, Sep 20, 2023 at 03:11:38AM -0300, Arthur Grillo wrote: >> In __drm_kunit_helper_alloc_drm_device_with_driver(), a drm_driver is >> allocated with kunit_kzalloc. If the dev argument was allocated by >> drm_kunit_helper_alloc_device, its deferred actions would access the >> already deallocated drm_driver. > > We already have a fix for that in drm-misc-fixes, could you give it a try? Oh! I didn't see that. I just ran it, it worked! Great fix :) Best Regards, ~Arthur Grillo > > Thanks! > Maxime