Fedora Account System
Red Hat Associate
Red Hat Customer
An off-by-one stack buffer overflow exists in GIMP's PNM file format parser. In pnmscanner_gettoken() in file-pnm.c, the loop condition ctr < bufsize allows ctr to reach bufsize (512), then buf[ctr] = '\0' writes one byte past the 512-byte stack buffer. The function is called from pnm_load_ascii() with a stack-allocated buf[BUFLEN] where BUFLEN = 512, with no extra room for the null terminator. - Function: pnmscanner_gettoken() - File: plug-ins/common/file-pnm.c:2103-2122 - Fix: https://gitlab.gnome.org/GNOME/gimp/-/commit/83699817 - Upstream issue: https://gitlab.gnome.org/GNOME/gimp/-/issues/16206 - Acknowledgment: bb1abu