Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2826883pxb; Mon, 1 Nov 2021 02:38:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxjERqjUdpXy88w32H/6sXk2mAv8o5K7C6++YY2uXY1ogzKw6ztK9qn+eJMQMrheihP3TpG X-Received: by 2002:a17:907:6da3:: with SMTP id sb35mr34115064ejc.41.1635759505265; Mon, 01 Nov 2021 02:38:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635759505; cv=none; d=google.com; s=arc-20160816; b=mxXaD+CX+/81GOHwmzHmUIWPQzBaxQNFudDE52I4QhkVsgMz1QnJ5lkY4bG4YEtNIe auiAuPgLDYHHpX5AwNoedAGY3s0bfW1TLRgNyQWO6hYAWxvCcLLcazRXAvpchaVuCJ0+ Id5Q4k40oOO0/MuXesdc8wKDZlMeWRf8/PMXghi/LrmNe38pNqYW/GNJl0kq+we0/mtd pdpKajmRhmOoPsKI9dmxgVsQnEdPC398OB+dIsLJSgrsbzAWqGKKikPGsVLzJuoKPwd1 zgnWrJOtH0n9MCr+TYgk/8dP9WzUoqWRLK98w1PzO8tSUO3qavNGKk4/w5/dMsT86PbS yLVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Vilft5uy5cKdcyTLWM5x1cm0Vv4dhuG/aNBq9bpRzyU=; b=Zwph5XUZOTaVXEqgXWRaial7ICAHVrNpwW8x0YCFcjF5/QCT5L4/nImUYdbmxr/IfK f+lBZl7SbsUmgTDLijQaZLXFGTxfCuPLuJNA6yGrLBIfRpQqit99mDCbGyfhQWDDAjZx e8cRBTpDT3UCEfgWVRhQqkY1PiUxTZapcxTzA46OUmLX8euyf+uo4ZtV3sSGJJ6+fNBs Q0yj3jRuTv0m5qAROqCjAn9PBxhTF+gD1X9M6FDn0cyJ1wI2MLlRdaDZ/MnoE7NfQZpW tr6uEbwbGHCu6p32muvOAGt7rM/DywYYcIdWPiDQD9b25VdCed5ypEwdGZ+GhZq23mmQ lZdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=OTedU4rg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g20si22480868ejz.342.2021.11.01.02.38.01; Mon, 01 Nov 2021 02:38:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=OTedU4rg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233765AbhKAJiO (ORCPT + 99 others); Mon, 1 Nov 2021 05:38:14 -0400 Received: from mail.kernel.org ([198.145.29.99]:43532 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232461AbhKAJfm (ORCPT ); Mon, 1 Nov 2021 05:35:42 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0EC2F60FC4; Mon, 1 Nov 2021 09:25:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1635758744; bh=OFhFgoTqjgHpQ0g/he1vUsUlzMawSymqAoEcmB3xyj4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OTedU4rgsqhgMYtCSjtQH+GbHPeAbj4Vq6cRd7nj0ItV6b7hjICeyel80MO2jjTrq yCjxBbKLTkoV00pJWgul0rg2EmUuNaj87zAKQagVecKNV60EPblm+bZd5bgOP7V5Wt Pe9fkEIlW7O9xmfjthnuHihbYbAdIhkR+72amY6E= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Thelford Williams , Alex Deucher Subject: [PATCH 5.10 33/77] drm/amdgpu: fix out of bounds write Date: Mon, 1 Nov 2021 10:17:21 +0100 Message-Id: <20211101082518.830218093@linuxfoundation.org> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211101082511.254155853@linuxfoundation.org> References: <20211101082511.254155853@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Thelford Williams commit 5afa7898ab7a0ec9c28556a91df714bf3c2f725e upstream. Size can be any value and is user controlled resulting in overwriting the 40 byte array wr_buf with an arbitrary length of data from buf. Signed-off-by: Thelford Williams Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c @@ -264,7 +264,7 @@ static ssize_t dp_link_settings_write(st if (!wr_buf) return -ENOSPC; - if (parse_write_buffer_into_params(wr_buf, size, + if (parse_write_buffer_into_params(wr_buf, wr_buf_size, (long *)param, buf, max_param_num, ¶m_nums)) {