#993579 xsane-common: Potential Integer Overflow vulnerability in src/xsane-save.c

Package:
xsane-common
Source:
xsane
Submitter:
"Potential Buffer Overflow vulnerability in xfig-3.2.7b"
Date:
2021-09-03 14:06:07 UTC
Severity:
normal
#993579#5
Date:
2021-09-03 11:17:56 UTC
From:
To:
Dear Maintainer,

 It seems that there exists potential Buffer Overflow in src/xsane-save.c
In line 522,
items_done = fscanf(file, "%d %d", &image_info->image_width, &image_info->image_height);

image_info.image_width is read from external source.

In line 2414 of src/xsane-viewer.c,
row     = malloc(((int) image_info.image_width * v->zoom) * image_info.channels);

image_info.image_width is being multiplied with v->zoom and image_info.channels.
If image_info.image_width is large enough, this can cause integer overflow.