mate-desktop / eom

An image viewer for MATE
http://www.mate-desktop.org
GNU General Public License v2.0
58 stars 32 forks source link

Memory leak issue in EOM when opening JPEG with near maximum pixel resources #341

Open a-shvedov opened 1 year ago

a-shvedov commented 1 year ago

Expected behavior

I expect eom to be able to handle the input image correctly without consuming excessive system resources.

Actual behavior

When I open a JPG file with eom, it consumes a significant amount of system memory, resulting in it consuming all available RAM (16 GB).

Steps to reproduce the behavior

  1. Run the eom utility with the file:
    `which eom` ./affect_163
  2. Monitor the system memory usage while opening the file.
  3. The eom memory consumption increases significantly, eventually consuming all available RAM.

The problem occurs all the time and is specific to the particular synthetic file created to test boundary resources (with a maximum supported image size of 65500 pixels): Input file data:

affect_163: JPEG image data, JFIF standard 1.01, resolution (DPI), density 300x300, segment length 16, progressive, precision 8, 65435x65493, components 3

I will assume that uncontrolled memory consumption is a problem, because it could allow an unauthorized user to temporarily disable the environment in which the utility will run, in the absence of the OOM-killer.

MATE general version

MATE Desktop Environment 1.26.0

Package version

Eye of MATE Image Viewer 1.26.0

Linux Distribution

RHEL Release 7.3.2 (5.15.87-1.el7.3.x86_64)

Links

image:affect_163 *should testing in sandbox valgrind log

raveit65 commented 1 year ago

Hmm, eom-1.26 or MATE-1.27 aren't build by fedora maintainer for epel repo. In result there will never been update for an unsupported version by me. Beside from the issue i suggest to switch to rhel8/9 where MATE is full supported by fedora epel.

a-shvedov commented 1 year ago

Also made a build from the latest upstream repository, but the problem persists regardless of the binding to the operating system..