From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtpout-03.galae.net (smtpout-03.galae.net [185.246.85.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 25D753E9F8D for ; Tue, 30 Jun 2026 09:10:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.85.4 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782810627; cv=none; b=iAnQ+pebIFvHSc9XvSmK1JH2c+EUr6Chjw9g00ex97MW9TeonF04Jfd80UoUiA9SGZ69Ltq/8k1sVh+TG7NbmxegRAEU0k+v9QchaIljVZii4s/w4EGC0tzAf4GwTo6YIwoVBijtMJAFtJv0etvzMHvYVFnndyPodFbJJ2OPoVc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782810627; c=relaxed/simple; bh=Y7usc7WlYcL4VP+BQlpIOSL+5tL1PZu6TyGAKCU+FGg=; h=From:Subject:Date:Message-Id:MIME-Version:Content-Type:To:Cc; b=Q6Jbjia4+eWP51CW4TXARWV5UwynCruWOwcWxhWqIgRZdshEsCUbWGIEnj6fSIuvnt87rplKmOSbzyS1fHyRHRRiZ41PBGrJGj+lYFqVbvayHC0Pw8pj31bFJwxSo1vtLSVUaUNAaSZMbHqEk4O0Bthpy7IY3P/alZrph6OYa80= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=GxpqxXDp; arc=none smtp.client-ip=185.246.85.4 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="GxpqxXDp" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id 64FB54E40BA6; Tue, 30 Jun 2026 09:10:23 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 2F64B60233; Tue, 30 Jun 2026 09:10:23 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id B42A0102F185C; Tue, 30 Jun 2026 11:10:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1782810622; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding; bh=dZdLesb8krrDYgxGMjqiPjbumEIUWTpnSwN04EP1YKE=; b=GxpqxXDpPxmCqzRlMbO2QcpMK6SNcxnuvR6+EiSxziugKhlT4mpsw7/JBJrm9Zgbg90Zdp 13wAVPSUhRvhD1ZqGvPAar4lFcDpLyDflfGG8Oi0BHPWvndkiKrAk0+qTy8OsvjTwx+I+y W2EXa2S9MzafZi/2i7BpzF/JG/hjmhx9V3MQwBWKUyOJSEZyP67NUoLjSDoQ8WsmYiWB6n SDxjkT/wWEpphNiJWNHzGYIp5rRkq2Dq64RX+RvYvCvhQBR1b9fI/344YNgKb9xDKlQVlU Dh+OqADZOECOV/V4vb/+QOyEQqW+VvwtmbI15eFjyRrXnsIrvWuSJyS5upYLmg== From: Romain Gantois Subject: [PATCH v2 0/2] drm/logicvc: Avoid UAF in DRM object management Date: Tue, 30 Jun 2026 11:10:09 +0200 Message-Id: <20260630-logicvc-uaf-v2-0-99e881833860@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIAAAAAAAC/1WNQQ6CMBBFr0JmbU1bhIgr72FYtMMAY5CaFhoN4 e4WWLl8yfvvLxDIMwW4ZQt4ihzYjQn0KQPszdiR4CYxaKlLWehSDK5jjChm0woyVsm8lY1sCNL i7anlz1571AeH2T4Jpy2xGT2HyfnvfhfV5h3lUqq/clRCiStWaAqbX3SFd+vcNPB4RveCel3XH 3IUiiO6AAAA X-Change-ID: 20260526-logicvc-uaf-eab103f0d0de To: Paul Kocialkowski , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter Cc: Thomas Petazzoni , Paul Kocialkowski , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Romain Gantois , Jason Xiang , stable@vger.kernel.org X-Mailer: b4 0.15.2 X-Last-TLS-Session-Version: TLSv1.3 Hi everyone, this is version two of my series which fixes some memory management issues in the logicvc-drm driver. Patch 1/2 migrates the driver to drmm to avoid accessing DRM objects after they have been freed by devm. Patch 2/2 uses the unplug mechanism to ensure that DRM objects aren't accessed after the DRM device is removed. Best Regards, Romain Signed-off-by: Romain Gantois --- Changes in v2: - Added protection of DRM device resources after removal using drm_dev_enter() - Link to v1: https://patch.msgid.link/20260601-logicvc-uaf-v1-1-8c9ca5b3429c@bootlin.com To: Paul Kocialkowski To: Maarten Lankhorst To: Maxime Ripard To: Thomas Zimmermann To: David Airlie To: Simona Vetter Cc: Jason Xiang Cc: Thomas Petazzoni Cc: Paul Kocialkowski Cc: dri-devel@lists.freedesktop.org Cc: linux-kernel@vger.kernel.org --- Romain Gantois (2): drm/logicvc: Avoid use-after-free with devm_kzalloc() drm/logicvc: Avoid using DRM resources after device is unplugged drivers/gpu/drm/logicvc/logicvc_crtc.c | 52 ++++++---- drivers/gpu/drm/logicvc/logicvc_drm.c | 9 +- drivers/gpu/drm/logicvc/logicvc_interface.c | 61 +++++------ drivers/gpu/drm/logicvc/logicvc_layer.c | 153 +++++++++++++++------------- 4 files changed, 156 insertions(+), 119 deletions(-) --- base-commit: 44e151be23deb788d9f6124de93823faf6e04e99 change-id: 20260526-logicvc-uaf-eab103f0d0de Best regards, -- Romain Gantois