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 B04C5426D31 for ; Wed, 4 Feb 2026 16:18:55 +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=1770221935; cv=none; b=SgoRiI3KaD1+y8UyN9V8Q1r5+sFj4I+GwhpNiNSHH3YUGZS0uzJMmr8iLPh5votwWhHs9guRhbIRKE7IVX5S4HC+WWqAr0UDMWnpV0XUpHmiqkmclubecIzkXJtm0jgM6d6I9UXLFiCpaxFkenozRaQsg2A4+OTmft1gmT2HOvQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770221935; c=relaxed/simple; bh=Tw5GBj5BJXY53mK+FWd7s1vNln988CLfh037hb2UR2w=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=BdYOvgwvo+dZdipI9P0IiUnpVJbpjv4fALdr7Dhu+PqR6RmMQIt7iakk97X7CJgdEe308+Q1fniwlloDjVjH7Ewid87/A8gp3q/cpm0j3vNv+Txposx8hpQhJVVLCZZh6EZeNFXlEKkt6pgXeTNR4hHk5Pgg995vO2SuWT8q5HY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=AoSuI1RN; 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="AoSuI1RN" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 44410C19424; Wed, 4 Feb 2026 16:18:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1770221935; bh=Tw5GBj5BJXY53mK+FWd7s1vNln988CLfh037hb2UR2w=; h=From:To:Cc:Subject:Date:Reply-To:From; b=AoSuI1RNAf81S7UiSxwNX/B7MTdfOYvUn+ld21FwsAPnVd4SXEAc6vCdt6Wb12Jn6 1FoU9w+PpoAESTZi2gy21kacSzMJ+K01GFAG5Xg9NSIdoyShIjvTAQ301s6DzGMnEm 8uYbTFD1zdDWgzwjrwvBSOscDSUKgEpZauqjln4g= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-71197: w1: therm: Fix off-by-one buffer overflow in alarms_store Date: Wed, 4 Feb 2026 17:14:12 +0100 Message-ID: <2026020412-CVE-2025-71197-cfe2@gregkh> X-Mailer: git-send-email 2.53.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=2800; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=4psaCi12osgadl8H1YLkx4iOapCH3Z9SmEDtFeZrfHQ=; b=owGbwMvMwCRo6H6F97bub03G02pJDJnNBSHHEtd+0VIJjFmr7/ntN8+WaxtqZ8XN6dZgmaI5j Uddp1K6I5aFQZCJQVZMkeXLNp6j+ysOKXoZ2p6GmcPKBDKEgYtTACZypo5hwTxBU7n+SeeDo5Us fq54/Ygp56/jQoYF23ifOi6fofeZ6d3/CzuEspZpBawUBgA= 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: w1: therm: Fix off-by-one buffer overflow in alarms_store The sysfs buffer passed to alarms_store() is allocated with 'size + 1' bytes and a NUL terminator is appended. However, the 'size' argument does not account for this extra byte. The original code then allocated 'size' bytes and used strcpy() to copy 'buf', which always writes one byte past the allocated buffer since strcpy() copies until the NUL terminator at index 'size'. Fix this by parsing the 'buf' parameter directly using simple_strtoll() without allocating any intermediate memory or string copying. This removes the overflow while simplifying the code. The Linux kernel CVE team has assigned CVE-2025-71197 to this issue. Affected and fixed versions =========================== Issue introduced in 5.8 with commit e2c94d6f572079511945e64537eb1218643f2e68 and fixed in 6.6.122 with commit 6a5820ecfa5a76c3d3e154802c8c15f391ef442e Issue introduced in 5.8 with commit e2c94d6f572079511945e64537eb1218643f2e68 and fixed in 6.12.68 with commit 6fd6d2a8e41b7f544a4d26cbd60bedf9c67893a0 Issue introduced in 5.8 with commit e2c94d6f572079511945e64537eb1218643f2e68 and fixed in 6.18.8 with commit e6b2609af21b5cccc9559339591b8a2cbf884169 Issue introduced in 5.8 with commit e2c94d6f572079511945e64537eb1218643f2e68 and fixed in 6.19-rc7 with commit 761fcf46a1bd797bd32d23f3ea0141ffd437668a 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-71197 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/w1/slaves/w1_therm.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/6a5820ecfa5a76c3d3e154802c8c15f391ef442e https://git.kernel.org/stable/c/6fd6d2a8e41b7f544a4d26cbd60bedf9c67893a0 https://git.kernel.org/stable/c/e6b2609af21b5cccc9559339591b8a2cbf884169 https://git.kernel.org/stable/c/761fcf46a1bd797bd32d23f3ea0141ffd437668a