From: Krzysztof Kozlowski <krzk@kernel.org>
To: David Laight <david.laight.linux@gmail.com>,
Huisong Li <lihuisong@huawei.com>,
Akira Shimahara <akira215corp@gmail.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Thorsten Blum <thorsten.blum@linux.dev>
Cc: stable@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5] w1: therm: Fix off-by-one buffer overflow in alarms_store
Date: Thu, 18 Dec 2025 17:06:30 +0100 [thread overview]
Message-ID: <176607399046.16637.3813737221857423754.b4-ty@kernel.org> (raw)
In-Reply-To: <20251216145007.44328-2-thorsten.blum@linux.dev>
On Tue, 16 Dec 2025 15:50:03 +0100, Thorsten Blum wrote:
> 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'.
>
> [...]
Applied, thanks!
[1/1] w1: therm: Fix off-by-one buffer overflow in alarms_store
https://git.kernel.org/krzk/linux-w1/c/761fcf46a1bd797bd32d23f3ea0141ffd437668a
Best regards,
--
Krzysztof Kozlowski <krzk@kernel.org>
prev parent reply other threads:[~2025-12-18 16:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-16 14:50 Thorsten Blum
2025-12-18 16:00 ` Krzysztof Kozlowski
2025-12-18 16:06 ` Krzysztof Kozlowski [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=176607399046.16637.3813737221857423754.b4-ty@kernel.org \
--to=krzk@kernel.org \
--cc=akira215corp@gmail.com \
--cc=david.laight.linux@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=lihuisong@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=thorsten.blum@linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®