{"api_version":"1","generated_at":"2026-08-02T17:40:03+00:00","cve":"CVE-2026-64365","urls":{"html":"https://cve.report/CVE-2026-64365","api":"https://cve.report/api/cve/CVE-2026-64365.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-64365","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-64365"},"summary":{"title":"HID: letsketch: fix UAF on inrange_timer at driver unbind","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nHID: letsketch: fix UAF on inrange_timer at driver unbind\n\nletsketch_driver does not provide a .remove callback, but\nletsketch_probe() arms a per-device timer:\n\n    timer_setup(&data->inrange_timer, letsketch_inrange_timeout, 0);\n\nThe timer is re-armed from letsketch_raw_event() with a 100 ms\ntimeout on every pen-in-range report, and its callback dereferences\ndata->input_tablet to deliver a synthetic BTN_TOOL_PEN release.\n\nletsketch_data is allocated with devm_kzalloc(), and its input_dev\nfields are devm-allocated via letsketch_setup_input_tablet().  On\ndevice unbind (USB unplug or rmmod), the HID core runs its default\nteardown and devm cleanup frees both letsketch_data and the input\ndevices.  Because no .remove callback exists, nothing drains the\ntimer first: if raw_event armed it within ~100 ms of the unbind,\nthe pending timer fires on freed memory.  This is a UAF read of\ndata and of data->input_tablet, followed by input_report_key() /\ninput_sync() into the freed input_dev.\n\nThe same problem can occur on the probe error path: if\nhid_hw_start() enabled I/O on an always-poll-quirk device and then\nfailed, raw_event may have armed the timer before devm releases\ndata.\n\nFix by adding a .remove callback that calls hid_hw_stop() first.\nhid_hw_stop() synchronously kills the URBs that deliver raw_event(),\nso once it returns no path can re-arm the timer.  timer_shutdown_sync()\nthen drains any in-flight callback and permanently disables further\nmod_timer() calls.  Apply the same timer_shutdown_sync() in the probe\nerror path so the timer is guaranteed not to outlive data.","state":"PUBLISHED","assigner":"Linux","published_at":"2026-07-25 10:17:19","updated_at":"2026-07-25 10:17:19"},"problem_types":[],"metrics":[],"references":[{"url":"https://git.kernel.org/stable/c/46c8beeccd8ab2c863827254a85ea877654a3534","name":"https://git.kernel.org/stable/c/46c8beeccd8ab2c863827254a85ea877654a3534","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/df3d8aa1a9392da3de66398e7a03422463806b21","name":"https://git.kernel.org/stable/c/df3d8aa1a9392da3de66398e7a03422463806b21","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/2bb6e7143cf70ed281822d26c1848b2897ac36e9","name":"https://git.kernel.org/stable/c/2bb6e7143cf70ed281822d26c1848b2897ac36e9","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/523db788c0f84612707638e266e8957ca7e3a756","name":"https://git.kernel.org/stable/c/523db788c0f84612707638e266e8957ca7e3a756","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/17f5928d7010bc9e002930326b59e60e40c09ee3","name":"https://git.kernel.org/stable/c/17f5928d7010bc9e002930326b59e60e40c09ee3","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/3eca1a8165b5e7996e699e9df76cb4645e184d42","name":"https://git.kernel.org/stable/c/3eca1a8165b5e7996e699e9df76cb4645e184d42","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-64365","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-64365","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 33a5c2793451770cb6dcf0cc35c76cfd4b045513 2bb6e7143cf70ed281822d26c1848b2897ac36e9 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 33a5c2793451770cb6dcf0cc35c76cfd4b045513 523db788c0f84612707638e266e8957ca7e3a756 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 33a5c2793451770cb6dcf0cc35c76cfd4b045513 17f5928d7010bc9e002930326b59e60e40c09ee3 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 33a5c2793451770cb6dcf0cc35c76cfd4b045513 3eca1a8165b5e7996e699e9df76cb4645e184d42 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 33a5c2793451770cb6dcf0cc35c76cfd4b045513 df3d8aa1a9392da3de66398e7a03422463806b21 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 33a5c2793451770cb6dcf0cc35c76cfd4b045513 46c8beeccd8ab2c863827254a85ea877654a3534 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 5.17","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 5.17 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.1.178 6.1.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.6.145 6.6.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.12.96 6.12.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.18.39 6.18.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.1.4 7.1.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.2-rc3 * original_commit_for_fix","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":{"cve_year":"2026","cve_id":"64365","cve":"CVE-2026-64365","epss":"0.001730000","percentile":"0.069670000","score_date":"2026-07-28","updated_at":"2026-07-29 00:05:33"},"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"defaultStatus":"unaffected","product":"Linux","programFiles":["drivers/hid/hid-letsketch.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"2bb6e7143cf70ed281822d26c1848b2897ac36e9","status":"affected","version":"33a5c2793451770cb6dcf0cc35c76cfd4b045513","versionType":"git"},{"lessThan":"523db788c0f84612707638e266e8957ca7e3a756","status":"affected","version":"33a5c2793451770cb6dcf0cc35c76cfd4b045513","versionType":"git"},{"lessThan":"17f5928d7010bc9e002930326b59e60e40c09ee3","status":"affected","version":"33a5c2793451770cb6dcf0cc35c76cfd4b045513","versionType":"git"},{"lessThan":"3eca1a8165b5e7996e699e9df76cb4645e184d42","status":"affected","version":"33a5c2793451770cb6dcf0cc35c76cfd4b045513","versionType":"git"},{"lessThan":"df3d8aa1a9392da3de66398e7a03422463806b21","status":"affected","version":"33a5c2793451770cb6dcf0cc35c76cfd4b045513","versionType":"git"},{"lessThan":"46c8beeccd8ab2c863827254a85ea877654a3534","status":"affected","version":"33a5c2793451770cb6dcf0cc35c76cfd4b045513","versionType":"git"}]},{"defaultStatus":"affected","product":"Linux","programFiles":["drivers/hid/hid-letsketch.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"status":"affected","version":"5.17"},{"lessThan":"5.17","status":"unaffected","version":"0","versionType":"semver"},{"lessThanOrEqual":"6.1.*","status":"unaffected","version":"6.1.178","versionType":"semver"},{"lessThanOrEqual":"6.6.*","status":"unaffected","version":"6.6.145","versionType":"semver"},{"lessThanOrEqual":"6.12.*","status":"unaffected","version":"6.12.96","versionType":"semver"},{"lessThanOrEqual":"6.18.*","status":"unaffected","version":"6.18.39","versionType":"semver"},{"lessThanOrEqual":"7.1.*","status":"unaffected","version":"7.1.4","versionType":"semver"},{"lessThanOrEqual":"*","status":"unaffected","version":"7.2-rc3","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.1.178","versionStartIncluding":"5.17","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.6.145","versionStartIncluding":"5.17","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.12.96","versionStartIncluding":"5.17","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.18.39","versionStartIncluding":"5.17","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.1.4","versionStartIncluding":"5.17","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.2-rc3","versionStartIncluding":"5.17","vulnerable":true}],"negate":false,"operator":"OR"}]}],"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nHID: letsketch: fix UAF on inrange_timer at driver unbind\n\nletsketch_driver does not provide a .remove callback, but\nletsketch_probe() arms a per-device timer:\n\n    timer_setup(&data->inrange_timer, letsketch_inrange_timeout, 0);\n\nThe timer is re-armed from letsketch_raw_event() with a 100 ms\ntimeout on every pen-in-range report, and its callback dereferences\ndata->input_tablet to deliver a synthetic BTN_TOOL_PEN release.\n\nletsketch_data is allocated with devm_kzalloc(), and its input_dev\nfields are devm-allocated via letsketch_setup_input_tablet().  On\ndevice unbind (USB unplug or rmmod), the HID core runs its default\nteardown and devm cleanup frees both letsketch_data and the input\ndevices.  Because no .remove callback exists, nothing drains the\ntimer first: if raw_event armed it within ~100 ms of the unbind,\nthe pending timer fires on freed memory.  This is a UAF read of\ndata and of data->input_tablet, followed by input_report_key() /\ninput_sync() into the freed input_dev.\n\nThe same problem can occur on the probe error path: if\nhid_hw_start() enabled I/O on an always-poll-quirk device and then\nfailed, raw_event may have armed the timer before devm releases\ndata.\n\nFix by adding a .remove callback that calls hid_hw_stop() first.\nhid_hw_stop() synchronously kills the URBs that deliver raw_event(),\nso once it returns no path can re-arm the timer.  timer_shutdown_sync()\nthen drains any in-flight callback and permanently disables further\nmod_timer() calls.  Apply the same timer_shutdown_sync() in the probe\nerror path so the timer is guaranteed not to outlive data."}],"providerMetadata":{"dateUpdated":"2026-07-25T08:50:20.039Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"references":[{"url":"https://git.kernel.org/stable/c/2bb6e7143cf70ed281822d26c1848b2897ac36e9"},{"url":"https://git.kernel.org/stable/c/523db788c0f84612707638e266e8957ca7e3a756"},{"url":"https://git.kernel.org/stable/c/17f5928d7010bc9e002930326b59e60e40c09ee3"},{"url":"https://git.kernel.org/stable/c/3eca1a8165b5e7996e699e9df76cb4645e184d42"},{"url":"https://git.kernel.org/stable/c/df3d8aa1a9392da3de66398e7a03422463806b21"},{"url":"https://git.kernel.org/stable/c/46c8beeccd8ab2c863827254a85ea877654a3534"}],"title":"HID: letsketch: fix UAF on inrange_timer at driver unbind","x_generator":{"engine":"bippy-1.2.0"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2026-64365","datePublished":"2026-07-25T08:50:20.039Z","dateReserved":"2026-07-19T15:36:31.783Z","dateUpdated":"2026-07-25T08:50:20.039Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-07-25 10:17:19","lastModifiedDate":"2026-07-25 10:17:19","problem_types":[],"metrics":[],"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"64365","Ordinal":"1","Title":"HID: letsketch: fix UAF on inrange_timer at driver unbind","CVE":"CVE-2026-64365","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"64365","Ordinal":"1","NoteData":"In the Linux kernel, the following vulnerability has been resolved:\n\nHID: letsketch: fix UAF on inrange_timer at driver unbind\n\nletsketch_driver does not provide a .remove callback, but\nletsketch_probe() arms a per-device timer:\n\n    timer_setup(&data->inrange_timer, letsketch_inrange_timeout, 0);\n\nThe timer is re-armed from letsketch_raw_event() with a 100 ms\ntimeout on every pen-in-range report, and its callback dereferences\ndata->input_tablet to deliver a synthetic BTN_TOOL_PEN release.\n\nletsketch_data is allocated with devm_kzalloc(), and its input_dev\nfields are devm-allocated via letsketch_setup_input_tablet().  On\ndevice unbind (USB unplug or rmmod), the HID core runs its default\nteardown and devm cleanup frees both letsketch_data and the input\ndevices.  Because no .remove callback exists, nothing drains the\ntimer first: if raw_event armed it within ~100 ms of the unbind,\nthe pending timer fires on freed memory.  This is a UAF read of\ndata and of data->input_tablet, followed by input_report_key() /\ninput_sync() into the freed input_dev.\n\nThe same problem can occur on the probe error path: if\nhid_hw_start() enabled I/O on an always-poll-quirk device and then\nfailed, raw_event may have armed the timer before devm releases\ndata.\n\nFix by adding a .remove callback that calls hid_hw_stop() first.\nhid_hw_stop() synchronously kills the URBs that deliver raw_event(),\nso once it returns no path can re-arm the timer.  timer_shutdown_sync()\nthen drains any in-flight callback and permanently disables further\nmod_timer() calls.  Apply the same timer_shutdown_sync() in the probe\nerror path so the timer is guaranteed not to outlive data.","Type":"Description","Title":"HID: letsketch: fix UAF on inrange_timer at driver unbind"}]}}}