]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: ncsi: Fix buffer overflow in fetching version id
authorHari Kalavakunta <kalavakunta.hari.prasad@gmail.com>
Tue, 10 Jun 2025 19:33:38 +0000 (12:33 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Aug 2025 14:28:24 +0000 (16:28 +0200)
commit1df5e6eb71e47b12d74d5a9105bce467b31ec29e
treee7381ff8a5d0e2a184f7eee363f3310b9586a149
parent859c54bb0120186151358a99f9b87419b1e2bf2f
net: ncsi: Fix buffer overflow in fetching version id

[ Upstream commit 8e16170ae972c7fed132bc928914a2ffb94690fc ]

In NC-SI spec v1.2 section 8.4.44.2, the firmware name doesn't
need to be null terminated while its size occupies the full size
of the field. Fix the buffer overflow issue by adding one
additional byte for null terminator.

Signed-off-by: Hari Kalavakunta <kalavakunta.hari.prasad@gmail.com>
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
Link: https://patch.msgid.link/20250610193338.1368-1-kalavakunta.hari.prasad@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/ncsi/internal.h
net/ncsi/ncsi-rsp.c