[lvc-project] [PATCH] ACPI: APD: fix off-by-one when copying clk-name property

Fedor Pchelkin pchelkin at ispras.ru
Mon Sep 14 13:45:48 MSK 2026


On Thu, 10. Sep 22:34, nathan2049 at yandex.ru wrote:
> From: Peter Zmanovsky <zzz4android at gmail.com>
> 
> The ACPI string object's .length field holds the byte count of the
> string excluding the NULL terminator.  fch_misc_setup() allocates
> obj->string.length bytes for the clock name buffer and then passes
> that same value as the size argument to strscpy().  Since strscpy()
> writes at most (size - 1) non-null characters before appending NULL,
> the last byte of the clock name is silently dropped.
> 
> Allocate obj->string.length + 1 bytes and pass that same count to
> strscpy() so the complete string is preserved.
> 
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
> 
> Fixes: 7fdb98e8a768b ("ACPI: APD: Add a fmw property clk-name")
> Signed-off-by: Peter Zmanovsky <zzz4android at gmail.com>

В адресатах указана не вся выдача скрипта get_maintainer.pl, как минимум
участников виновного коммита не было добавлено.  А ведь их как правило
следует упоминать в адресатах фикс-патча, они даже ревью могут дать.

Впрочем, для lvc-веток просьба направить отдельные серии патчей только в
список рассылки lvc-patches at linuxtesting.org, указав в теме письма
номера целевых веток.




More information about the lvc-project mailing list