From mboxrd@z Thu Jan 1 00:00:00 1970 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 4AF182046A8 for ; Tue, 1 Apr 2025 15:41:53 +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=1743522115; cv=none; b=XtiC/HzUuw7FmW0QngQJUxHiZaqTXE4Vom6XDu8uNk5LQqjnNL3RqN3Fi6NTm1Vp8AbSi9siAYreBpi2fed+rDJoup9lHEUlOv/Jl29Xh2C/T/ZJSQ7OHcU2SzGQeKLYmPcbqBmIXV1Tf+FGSTRQ2P50/kM6cmjPrb4Zd8I1fBU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743522115; c=relaxed/simple; bh=1JlP9kAG8x1ixblP0lSmFH7x8COWYJhw/OcwhzVckYo=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Kk5/Siumd7MEWi3zMx46iwPF5Vq88Aw2F7Bgo+5h7d8iGC+QzyEvkEC804GbXO7JD/hm1Pc/pz19j1z5ZIZC0RUlyUqnY2vt4fqqpwUlrpoN7Ttq7LxZHTKTR544WVO5FNilyTJi9C/aAWR61Uz7mAd/JaAqyt5yzJ5vJBqQMTM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=yhaJkozB; 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="yhaJkozB" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6827DC4CEE4; Tue, 1 Apr 2025 15:41:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1743522113; bh=1JlP9kAG8x1ixblP0lSmFH7x8COWYJhw/OcwhzVckYo=; h=From:To:Cc:Subject:Date:Reply-to:From; b=yhaJkozBdSDr5+GgPmuQNAsqzoCnCozJfFw81LmMhecB3A7XQqkqgNf2SlPKhr+6u +cS2QBFzjXZE/+Ne7DbtNzvwruPAYUKPABAUPRqmqPiSThfk7c1vMtUGmuxZcVgtPf uqZiYKkEnTgBrZjQxbuISHDqPfGHskwD1aeZ1NXw= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-21928: HID: intel-ish-hid: Fix use-after-free issue in ishtp_hid_remove() Date: Tue, 1 Apr 2025 16:39:52 +0100 Message-ID: <2025040133-CVE-2025-21928-e444@gregkh> X-Mailer: git-send-email 2.49.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=3878; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=1JlP9kAG8x1ixblP0lSmFH7x8COWYJhw/OcwhzVckYo=; b=owGbwMvMwCRo6H6F97bub03G02pJDOlvOLa6K93O3RHBc3jejd12THufvxV6vSBEwy1B0fXap EN8jxdXdMSyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBE+BgZ5nsevJ8cp7l+zWtO y4BE74yMr1Hl/xnmyiyxaGUQE2UuXrVpQ1786je9N3vjAA== 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: HID: intel-ish-hid: Fix use-after-free issue in ishtp_hid_remove() The system can experience a random crash a few minutes after the driver is removed. This issue occurs due to improper handling of memory freeing in the ishtp_hid_remove() function. The function currently frees the `driver_data` directly within the loop that destroys the HID devices, which can lead to accessing freed memory. Specifically, `hid_destroy_device()` uses `driver_data` when it calls `hid_ishtp_set_feature()` to power off the sensor, so freeing `driver_data` beforehand can result in accessing invalid memory. This patch resolves the issue by storing the `driver_data` in a temporary variable before calling `hid_destroy_device()`, and then freeing the `driver_data` after the device is destroyed. The Linux kernel CVE team has assigned CVE-2025-21928 to this issue. Affected and fixed versions =========================== Issue introduced in 4.9 with commit 0b28cb4bcb17dcb5fe0763fc3e1a94398b8f6cf6 and fixed in 5.4.291 with commit 0c1fb475ef999d6c22fc3f963fdf20cb3ed1b03d Issue introduced in 4.9 with commit 0b28cb4bcb17dcb5fe0763fc3e1a94398b8f6cf6 and fixed in 5.10.235 with commit d3faae7f42181865c799d88c5054176f38ae4625 Issue introduced in 4.9 with commit 0b28cb4bcb17dcb5fe0763fc3e1a94398b8f6cf6 and fixed in 5.15.179 with commit 01b18a330cda61cc21423a7d1af92cf31ded8f60 Issue introduced in 4.9 with commit 0b28cb4bcb17dcb5fe0763fc3e1a94398b8f6cf6 and fixed in 6.1.131 with commit cf1a6015d2f6b1f0afaa0fd6a0124ff2c7943394 Issue introduced in 4.9 with commit 0b28cb4bcb17dcb5fe0763fc3e1a94398b8f6cf6 and fixed in 6.6.83 with commit 560f4d1299342504a6ab8a47f575b5e6b8345ada Issue introduced in 4.9 with commit 0b28cb4bcb17dcb5fe0763fc3e1a94398b8f6cf6 and fixed in 6.12.19 with commit dea6a349bcaf243fff95dfd0428a26be6a0fb44e Issue introduced in 4.9 with commit 0b28cb4bcb17dcb5fe0763fc3e1a94398b8f6cf6 and fixed in 6.13.7 with commit eb0695d87a81e7c1f0509b7d8ee7c65fbc26aec9 Issue introduced in 4.9 with commit 0b28cb4bcb17dcb5fe0763fc3e1a94398b8f6cf6 and fixed in 6.14 with commit 07583a0010696a17fb0942e0b499a62785c5fc9f 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-2025-21928 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/hid/intel-ish-hid/ishtp-hid.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/0c1fb475ef999d6c22fc3f963fdf20cb3ed1b03d https://git.kernel.org/stable/c/d3faae7f42181865c799d88c5054176f38ae4625 https://git.kernel.org/stable/c/01b18a330cda61cc21423a7d1af92cf31ded8f60 https://git.kernel.org/stable/c/cf1a6015d2f6b1f0afaa0fd6a0124ff2c7943394 https://git.kernel.org/stable/c/560f4d1299342504a6ab8a47f575b5e6b8345ada https://git.kernel.org/stable/c/dea6a349bcaf243fff95dfd0428a26be6a0fb44e https://git.kernel.org/stable/c/eb0695d87a81e7c1f0509b7d8ee7c65fbc26aec9 https://git.kernel.org/stable/c/07583a0010696a17fb0942e0b499a62785c5fc9f