A remote code execution vulnerability in GNOME
A remote code execution vulnerability in GNOME
Posted Oct 10, 2023 20:13 UTC (Tue) by rweikusat2 (subscriber, #117920)In reply to: A remote code execution vulnerability in GNOME by fredrik
Parent article: A remote code execution vulnerability in GNOME
The vulnerability is an integer overflow, ie, someone using atoi(3) to parse a number and assuming the result will always be positive. This an ancient UNIX interface which has been deficient (or unexpectedly featured) since its invention in the early 1970s (it's already documented as machine code subroutine for the first version of UNIX). The proper way to handle this is to use the proper interface for it (strtoul(3) --- standardized since the first ANSI C standard) and check for error returns.
I don't think the attitude behind this kind of "Just can't be arsed!"-coding can be fixed by doing it in a different programming language.
