]> dgit.raspbian.org Git - grub2.git/commit
net: Use safe math macros to prevent overflows
authorLidong Chen <lidong.chen@oracle.com>
Wed, 22 Jan 2025 18:04:42 +0000 (18:04 +0000)
committerAurelien Jarno <aurel32@debian.org>
Thu, 30 Apr 2026 19:02:01 +0000 (21:02 +0200)
commitaf22fb80ab29ec6578d6dc3c49c8e092a13b39af
tree660d144af55bbf2a0b9a51342dc729b435c17fc0
parent9ef142b79068aada91afdb59407bb4e0ac8a0cc3
net: Use safe math macros to prevent overflows

Replace direct arithmetic operations with macros from include/grub/safemath.h
to prevent potential overflow issues when calculating the memory sizes.

Signed-off-by: Lidong Chen <lidong.chen@oracle.com>
Signed-off-by: Alec Brown <alec.r.brown@oracle.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Conflicts:
grub-core/net/bootp.c
grub-core/net/net.c

Gbp-Pq: Topic cve-2025-jan
Gbp-Pq: Name net-Use-safe-math-macros-to-prevent-overflows.patch
grub-core/net/bootp.c
grub-core/net/dns.c
grub-core/net/drivers/ieee1275/ofnet.c
grub-core/net/net.c