Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 569997DA7F for ; Tue, 5 Nov 2024 17:05:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730826311; cv=none; b=isLtvW71FBj/3Qk9Rc2SsezZO/0VXXeY5KtagJgg43ULNCT7AxsE8J/tF8lN/Su6Pr23yhBcCxufJB2vHGenQMU1IpnVjsU/ZWTqfOvCb7Ci34hPIwS0gMFVdS358xDxgcKgzcRZ8iSsXHMf9dWUSD1kpGYm1D8dJ2ncunRFX74= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730826311; c=relaxed/simple; bh=YG1ajFcCQAJshmqASFc6kIuJnLPylgaC3kyhwQzolxo=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=RRPcmVzTpWqREqIgn0vShu86mhKHvQ2qEnF8JBWZZLXJ6AIYir2iGOFTfQfo/16twnMKMMZxYApalv3ep/LoU2VVZJqVvV0n3KcKLjOsJ53LqBCJ90WeVtZ80PmjeSJ/OPjP9YJH7ymUNwfha+6x38JGakhDQ5AabNHqOQs8s1s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=MGjH2R8o; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="MGjH2R8o" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8824BC4CED2; Tue, 5 Nov 2024 17:05:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1730826310; bh=YG1ajFcCQAJshmqASFc6kIuJnLPylgaC3kyhwQzolxo=; h=From:To:Cc:Subject:Date:Reply-to:From; b=MGjH2R8oDiN9dMNpKTCFJzYysgmlq7QAKQtCrWLuZHJXWzrTn8Dnf9/6gonRs4rPG a9TYRV2oiFVvC2gc22njuglOUj0knJHzOi2iigyIDxCGem6UX+j/KsDwYpKCP6qAuL g36MbYMmPo3TwFNf3oEsKpK59I3JYL/tchg7HzNQ= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-50090: drm/xe/oa: Fix overflow in oa batch buffer Date: Tue, 5 Nov 2024 18:04:50 +0100 Message-ID: <2024110551-CVE-2024-50090-2727@gregkh> X-Mailer: git-send-email 2.47.0 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: , X-Developer-Signature: v=1; a=openpgp-sha256; l=2411; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=YG1ajFcCQAJshmqASFc6kIuJnLPylgaC3kyhwQzolxo=; b=owGbwMvMwCRo6H6F97bub03G02pJDOlaAcZst4X+ybb25Jh27ruicL9XID5YePKzqa/FHn/Wd b2RrKncEcvCIMjEICumyPJlG8/R/RWHFL0MbU/DzGFlAhnCwMUpABNRnM0whyuf8WDebZusHeme u9ctsdLsndu5l2Ge+fGV+8+UaDikRNko6KRKWXRpMDsBAA== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit Description =========== In the Linux kernel, the following vulnerability has been resolved: drm/xe/oa: Fix overflow in oa batch buffer By default xe_bb_create_job() appends a MI_BATCH_BUFFER_END to batch buffer, this is not a problem if batch buffer is only used once but oa reuses the batch buffer for the same metric and at each call it appends a MI_BATCH_BUFFER_END, printing the warning below and then overflowing. [ 381.072016] ------------[ cut here ]------------ [ 381.072019] xe 0000:00:02.0: [drm] Assertion `bb->len * 4 + bb_prefetch(q->gt) <= size` failed! platform: LUNARLAKE subplatform: 1 graphics: Xe2_LPG / Xe2_HPG 20.04 step B0 media: Xe2_LPM / Xe2_HPM 20.00 step B0 tile: 0 VRAM 0 B GT: 0 type 1 So here checking if batch buffer already have MI_BATCH_BUFFER_END if not append it. v2: - simply fix, suggestion from Ashutosh (cherry picked from commit 9ba0e0f30ca42a98af3689460063edfb6315718a) The Linux kernel CVE team has assigned CVE-2024-50090 to this issue. Affected and fixed versions =========================== Fixed in 6.11.4 with commit bcb5be342170 Fixed in 6.12-rc1 with commit 6c10ba06bb1b Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community. Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at https://cve.org/CVERecord/?id=CVE-2024-50090 will be updated if fixes are backported, please check that for the most up to date information about this issue. Affected files ============== The file(s) affected by this issue are: drivers/gpu/drm/xe/xe_bb.c Mitigation ========== The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits: https://git.kernel.org/stable/c/bcb5be3421705e682b0b32073ad627056d6bc2a2 https://git.kernel.org/stable/c/6c10ba06bb1b48acce6d4d9c1e33beb9954f1788