A buffer overflow in jq might allow remote attackers to execute arbitrary code.
| Package | Arch | Vulnerable | Unaffected |
|---|---|---|---|
| app-misc/jq | * | < 1.5-r2 | >= 1.5-r2 |
jq is a lightweight and flexible command-line JSON processor.
An off-by-one error was discovered in the tokenadd function in jv_parse.c which triggers a heap-based buffer overflow.
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.
There is no known workaround at this time.
All jq users should upgrade to the latest version:
# emerge --sync # emerge --ask --oneshot --verbose ">=app-misc/jq-1.5-r2"