Lidong Chen 0087bc6902 fs/tar: Integer overflow leads to heap OOB write
Both namesize and linksize are derived from hd.size, a 12-digit octal
number parsed by read_number(). Later direct arithmetic calculation like
"namesize + 1" and "linksize + 1" may exceed the maximum value of
grub_size_t leading to heap OOB write. This patch fixes the issue by
using grub_add() and checking for an overflow.

Fixes: CVE-2024-45780

Reported-by: Nils Langius <nils@langius.de>
Signed-off-by: Lidong Chen <lidong.chen@oracle.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Reviewed-by: Alec Brown <alec.r.brown@oracle.com>
2025-01-23 16:15:31 +01:00
..
2011-10-30 16:10:18 +01:00
2022-03-14 15:45:30 +01:00
2011-04-11 18:13:00 +02:00
2022-07-27 19:20:53 +02:00
2022-03-14 15:45:30 +01:00
2024-01-25 18:08:48 +01:00
2011-04-11 08:16:13 +02:00
2022-03-14 15:45:30 +01:00
2023-10-03 15:38:48 +02:00
2019-04-09 10:03:29 +10:00
2022-03-14 15:45:30 +01:00
2022-03-14 15:45:30 +01:00
2023-06-13 14:48:38 +02:00
2010-05-06 11:34:04 +05:30
2012-12-08 20:56:58 +01:00
2024-12-02 17:32:51 +01:00