Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 35CB33F23B5 for ; Tue, 6 Oct 2026 08:47:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791276431; cv=none; b=Wm3qnt5UqEV72dWjOl4UhkpzDA+Q5zbWKhHo50LgCOw+6+FGa37ODxydXXWxGONQ/3i3hSyZL51lGpCR3/IT3yrUhxlsm7UsKhlrWxGffBVHLce2pIUvukKJwBclIYbQ1YB6jgXH75JucQsRMkjkmOzRtgUAK7BS5ZEfJ11kmkI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791276431; c=relaxed/simple; bh=3GpXLIJGcL4+0vAUPTWDhMq9xcH0v2LC4yy1M+1irsc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=RkAxd1CKX918qC2DMSA8NO7lyrLb5o0JWB19HPCCBjyC8GZtZsFlY6WHvBZVlCevwXM8X8+S1K/odqsQ4QQlJ/XcZavMlqTMfljLU6oeMXodC/lAe92IE65uiXCuh0Tl04VWDtUfbwCJ3HXdgCLN82maHyI6AIE0YB1N3MUmZlQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=peG46EK0; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="peG46EK0" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 136751F000FF; Tue, 6 Oct 2026 08:47:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1791276428; bh=qNjiPjoDZSYCl/U0WpuCZDWnMQBo0wC5wUocD2siI+0=; h=From:To:Cc:Subject:Date:Reply-To; b=peG46EK0bVXPtQhhjmsSvk9qBdbxJ6rrBy2NzWsXBUkYPTM2AiGoNi3cknJKPapOS SV1QBJYRaQ02OeVFD43MqoNYE00iIVuOZaKQkW1HzPFSNuYYY4IFdBi/pPqRqYmZWo +YlxtoWJAnwJOUjsE/j5nk8SxtZjxcwmgn/lH/LM= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-98198: hwmon: (pwm-fan) Stop RPM timer before freeing tach data Date: Tue, 6 Oct 2026 10:44:59 +0200 Message-ID: <2026100636-CVE-2026-98198-d447@gregkh> X-Mailer: git-send-email 2.56.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3506; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=aple6Y/sx8mWea75OqEMVEEOn1udRnv1bJ3gCoJosbs=; b=owGbwMvMwCRo6H6F97bub03G02pJDFlHtny5pCAmkrDyOmelFsfNP1WPEoUtKu2uMOrb8H0tU dtnHHS3I5aFQZCJQVZMkeXLNp6j+ysOKXoZ2p6GmcPKBDKEgYtTACayXIRhfoU+YwdLeeQCgR+2 Qn7bPt3ZlbLoJsNcEenrXzIPCSqeNzrL5pui6PE9T5AZAA== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: hwmon: (pwm-fan) Stop RPM timer before freeing tach data sample_timer() rearms the RPM timer and accesses the devm-managed ctx->tachs and ctx->pulses_per_revolution arrays. The cleanup action which stops the timer is registered before those arrays are allocated. Since devres releases entries in reverse order, driver detach can free the arrays before pwm_fan_cleanup() shuts down the timer. A timer expiry in that window accesses the freed tach data. With a KASAN kernel, a test-only kprobe delayed entry to pwm_fan_cleanup() while normal sysfs unbind ran. Each of three runs reported three four-byte reads and two four-byte writes in sample_timer() after its backing devm allocations had been freed. The helper did not invoke the timer callback, cleanup actions or free functions. With the fix, three matching unbind runs completed without KASAN, BUG, WARNING, Oops or panic. Instrumentation confirmed that timer retirement completed before the first timer backing allocation was released. Split timer retirement from the power cleanup and register its devres action after the timer backing data and IRQ actions are installed. This preserves the early power rollback action while ensuring the timer is retired before its backing data is released. Use timer_shutdown_sync() because the callback can rearm itself. The Linux kernel CVE team has assigned CVE-2026-98198 to this issue. Affected and fixed versions =========================== Issue introduced in 5.12 with commit 01695410d4529e38fea6159fa9f1260c598290b0 and fixed in 6.12.112 with commit 1e824fdb14a187ce56697e803b02b1e86243a755 Issue introduced in 5.12 with commit 01695410d4529e38fea6159fa9f1260c598290b0 and fixed in 6.18.54 with commit a5ce3fe5335a24d0220958c6866830a6d5fa1cc0 Issue introduced in 5.12 with commit 01695410d4529e38fea6159fa9f1260c598290b0 and fixed in 7.2.8 with commit b48339b0a577783e4590a69e4cd2f2760ce33154 Issue introduced in 5.12 with commit 01695410d4529e38fea6159fa9f1260c598290b0 and fixed in 7.3-rc4 with commit 26d5ff79768548efb1e604bb6e8697c101e06269 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-2026-98198 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/hwmon/pwm-fan.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/1e824fdb14a187ce56697e803b02b1e86243a755 https://git.kernel.org/stable/c/a5ce3fe5335a24d0220958c6866830a6d5fa1cc0 https://git.kernel.org/stable/c/b48339b0a577783e4590a69e4cd2f2760ce33154 https://git.kernel.org/stable/c/26d5ff79768548efb1e604bb6e8697c101e06269