file: Heap-based buffer overflow — GLSA 202003-24

A heap-based buffer overflow in file might allow remote attackers to execute arbitrary code.

Affected packages

sys-apps/file on all architectures
Affected versions < 5.37-r1
Unaffected versions >= 5.37-r1

Background

file is a utility that guesses a file format by scanning binary data for patterns.

Description

It was discovered that file incorrectly handled certain malformed files.

Impact

A remote attacker could entice a user to process a specially crafted file via libmagic or file, possibly resulting in execution of arbitrary code with the privileges of the process or a Denial of Service condition.

Workaround

There is no known workaround at this time.

Resolution

All file users should upgrade to the latest version:

 # emerge --sync
 # emerge --ask --oneshot --verbose ">=sys-apps/file-5.37-r1"
 

References

Release date
March 15, 2020

Latest revision
March 15, 2020: 1

Severity
normal

Exploitable
local, remote

Bugzilla entries