Skip to content

Commit eb1469d

Browse files
azurelinux-securityjykanasejslobodzian
authored
[AutoPR- Security] Patch jq for CVE-2025-48060 [HIGH] (microsoft#14379)
Co-authored-by: jykanase <[email protected]> Co-authored-by: jslobodzian <[email protected]>
1 parent fd5507a commit eb1469d

File tree

2 files changed

+44
-1
lines changed

2 files changed

+44
-1
lines changed

SPECS/jq/CVE-2025-48060.patch

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
From e3a08a2f1d4925f3903adb501f1665b9f6c97a61 Mon Sep 17 00:00:00 2001
2+
From: Azure Linux Security Servicing Account
3+
4+
Date: Thu, 24 Jul 2025 10:40:19 +0000
5+
Subject: [PATCH] Fix CVE CVE-2025-48060 in jq
6+
7+
[AI Backported] Upstream Patch Reference: https://github.com/jqlang/jq/commit/c6e041699d8cd31b97375a2596217aff2cfca85b.patch
8+
---
9+
src/jv.c | 1 +
10+
tests/jq.test | 3 +++
11+
2 files changed, 4 insertions(+)
12+
13+
diff --git a/src/jv.c b/src/jv.c
14+
index d3042e6..d7e3938 100644
15+
--- a/src/jv.c
16+
+++ b/src/jv.c
17+
@@ -498,6 +498,7 @@ static jv jvp_string_empty_new(uint32_t length) {
18+
jvp_string* s = jvp_string_alloc(length);
19+
s->length_hashed = 0;
20+
memset(s->data, 0, length);
21+
+ s->data[length] = 0;
22+
jv r = {JV_KIND_STRING, 0, 0, 0, {&s->refcnt}};
23+
return r;
24+
}
25+
diff --git a/tests/jq.test b/tests/jq.test
26+
index 2c58574..06c39f0 100644
27+
--- a/tests/jq.test
28+
+++ b/tests/jq.test
29+
@@ -1520,4 +1520,7 @@ isempty(1,error("foo"))
30+
null
31+
false
32+
33+
+try 0[implode] catch .
34+
+[]
35+
+"Cannot index number with string \"\""
36+
37+
--
38+
2.45.2
39+

SPECS/jq/jq.spec

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
Summary: jq is a lightweight and flexible command-line JSON processor.
22
Name: jq
33
Version: 1.6
4-
Release: 3%{?dist}
4+
Release: 4%{?dist}
55
Group: Applications/System
66
Vendor: Microsoft Corporation
77
License: MIT
88
URL: https://github.com/stedolan/jq
99
Source0: https://github.com/stedolan/jq/releases/download/%{name}-%{version}/%{name}-%{version}.tar.gz
1010
Distribution: Mariner
1111
Patch0: CVE-2024-23337.patch
12+
Patch1: CVE-2025-48060.patch
1213
BuildRequires: bison
1314
BuildRequires: chrpath
1415
BuildRequires: flex
@@ -59,6 +60,9 @@ make check
5960
%{_includedir}/*
6061

6162
%changelog
63+
* Thu Jul 24 2025 Azure Linux Security Servicing Account <[email protected]> - 1.6-4
64+
- Patch for CVE-2025-48060
65+
6266
* Mon May 26 2025 Akhila Guruju <[email protected]> - 1.6-3
6367
- Patch CVE-2024-23337
6468

0 commit comments

Comments
 (0)