]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
gpu: nova-core: use checked arithmetic in Booter signature parsing
authorJoel Fernandes <joelagnelf@nvidia.com>
Mon, 26 Jan 2026 20:23:02 +0000 (15:23 -0500)
committerAlexandre Courbot <acourbot@nvidia.com>
Tue, 24 Feb 2026 23:16:55 +0000 (08:16 +0900)
commit4f2609685418cc995ff6a2d558ed62214dec75dc
tree9de433f16ef5593ebe347637ce11cd319eff28cd
parent0568b376a0b13da6582bce1f2e2bbb2eae7fc266
gpu: nova-core: use checked arithmetic in Booter signature parsing

Use checked_add() when computing signature offsets from firmware-
provided values in signatures_iter().

Without checked arithmetic, overflow could wrap to a small plausible
offset that points to entirely wrong data.

Reviewed-by: Zhi Wang <zhiw@nvidia.com>
Signed-off-by: Joel Fernandes <joelagnelf@nvidia.com>
Reviewed-by: Gary Guo <gary@garyguo.net>
Link: https://patch.msgid.link/20260126202305.2526618-3-joelagnelf@nvidia.com
[acourbot@nvidia.com: remove obvious computation comments.]
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
drivers/gpu/nova-core/firmware/booter.rs