jq: Buffer overflow — GLSA 201612-20

A buffer overflow in jq might allow remote attackers to execute arbitrary code.

Affected Packages

app-misc/jq on all architectures
Affected versions < 1.5-r2
Unaffected versions >= 1.5-r2

Background

jq is a lightweight and flexible command-line JSON processor.

Description

An off-by-one error was discovered in the tokenadd function in jv_parse.c which triggers a heap-based buffer overflow.

Impact

A remote attacker could trick a victim into processing a specially crafted JSON file, possibly resulting in the execution of arbitrary code with the privileges of the process. Additionally, a remote attacker could cause a Denial of Service condition.

Workaround

There is no known workaround at this time.

Resolution

All jq users should upgrade to the latest version:

 # emerge --sync
 # emerge --ask --oneshot --verbose ">=app-misc/jq-1.5-r2"
 

References

Release Date
December 08, 2016

Latest Revision
December 08, 2016: 1

Severity
normal

Exploitable
remote

Bugzilla entries