HID: intel-ish-hid: Fix use-after-free issue in ishtp_hid_remove()
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.
- Products
- Kernel
- Affected versions
- Not specified
- Fixed versions
- 5.10.235, 5.15.179, 5.4.291, 6.1.131, 6.12.19, 6.13.7, 6.6.83
- CVEs
- CVE-2025-21928
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 5 Nov 2026, 18:01 UTC · Revision 1
Source evidence
HID: intel-ish-hid: Fix use-after-free issue in ishtp_hid_remove()
core-osv · Original sourcePublished 1 Apr 2025, 15:40 UTC
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.
osv:CVE-2025-21928
Kernel
Fixed versions: 5.4.291, 5.10.235, 5.15.179, 6.1.131, 6.6.83, 6.12.19, 6.13.7
Complete source record
{
"id": "515ef4c71f146ba0960c90c7dc2a66ab123c5535c6d6b863ac2192c7ac8920fd",
"url": "https://osv.dev/vulnerability/CVE-2025-21928",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "HID: intel-ish-hid: Fix use-after-free issue in ishtp_hid_remove()",
"summary": "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.",
"evidence": "osv:CVE-2025-21928",
"products": [
{
"name": {
"value": "Kernel",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "5.4.291",
"evidence": "/affected/1/ranges"
},
{
"value": "5.10.235",
"evidence": "/affected/1/ranges"
},
{
"value": "5.15.179",
"evidence": "/affected/1/ranges"
},
{
"value": "6.1.131",
"evidence": "/affected/1/ranges"
},
{
"value": "6.6.83",
"evidence": "/affected/1/ranges"
},
{
"value": "6.12.19",
"evidence": "/affected/1/ranges"
},
{
"value": "6.13.7",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": []
}
],
"severity": "high",
"structured": {
"id": "CVE-2025-21928",
"aliases": [
"CVE-2025-21928"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "0b28cb4bcb17dcb5fe0763fc3e1a94398b8f6cf6"
},
{
"fixed": "0c1fb475ef999d6c22fc3f963fdf20cb3ed1b03d"
},
{
"fixed": "d3faae7f42181865c799d88c5054176f38ae4625"
},
{
"fixed": "01b18a330cda61cc21423a7d1af92cf31ded8f60"
},
{
"fixed": "cf1a6015d2f6b1f0afaa0fd6a0124ff2c7943394"
},
{
"fixed": "560f4d1299342504a6ab8a47f575b5e6b8345ada"
},
{
"fixed": "dea6a349bcaf243fff95dfd0428a26be6a0fb44e"
},
{
"fixed": "eb0695d87a81e7c1f0509b7d8ee7c65fbc26aec9"
},
{
"fixed": "07583a0010696a17fb0942e0b499a62785c5fc9f"
}
]
}
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-21928.json"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "4.9.0"
},
{
"fixed": "5.4.291"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.5.0"
},
{
"fixed": "5.10.235"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.11.0"
},
{
"fixed": "5.15.179"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.16.0"
},
{
"fixed": "6.1.131"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.2.0"
},
{
"fixed": "6.6.83"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.7.0"
},
{
"fixed": "6.12.19"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.13.0"
},
{
"fixed": "6.13.7"
}
]
}
],
"package": {
"name": "Kernel",
"ecosystem": "Linux"
},
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-21928.json"
}
}
],
"modified": "2026-10-28T02:30:44.793757006Z",
"provider": "osv",
"references": [
"https://git.kernel.org/stable/c/01b18a330cda61cc21423a7d1af92cf31ded8f60",
"https://git.kernel.org/stable/c/07583a0010696a17fb0942e0b499a62785c5fc9f",
"https://git.kernel.org/stable/c/0c1fb475ef999d6c22fc3f963fdf20cb3ed1b03d",
"https://git.kernel.org/stable/c/560f4d1299342504a6ab8a47f575b5e6b8345ada",
"https://git.kernel.org/stable/c/cf1a6015d2f6b1f0afaa0fd6a0124ff2c7943394",
"https://git.kernel.org/stable/c/d3faae7f42181865c799d88c5054176f38ae4625",
"https://git.kernel.org/stable/c/dea6a349bcaf243fff95dfd0428a26be6a0fb44e",
"https://git.kernel.org/stable/c/eb0695d87a81e7c1f0509b7d8ee7c65fbc26aec9",
"https://lists.debian.org/debian-lts-announce/2025/05/msg00030.html",
"https://lists.debian.org/debian-lts-announce/2025/05/msg00045.html",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/21xxx/CVE-2025-21928.json",
"https://nvd.nist.gov/vuln/detail/CVE-2025-21928",
"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
],
"provider_metadata": {
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/21xxx/CVE-2025-21928.json"
}
},
"related_cves": [
{
"value": "CVE-2025-21928",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 512611,
"published_at": "2025-04-01T15:40:59.033+00:00"
}