file: Stack-based buffer overflow — GLSA 201710-02

A stack-based buffer overflow was found in file, possibly resulting in the execution of arbitrary code.

Affected packages

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

Background

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

Description

An issue discovered in file allows attackers to write 20 bytes to the stack buffer via a specially crafted .notes section.

Impact

A remote attacker, by using a specially crafted .notes section in an ELF binary, could execute arbitrary code or cause 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.32"
 

References

Release date
October 08, 2017

Latest revision
October 08, 2017: 1

Severity
normal

Exploitable
remote

Bugzilla entries