Skip to content

Commit 1b72799

Browse files
CBL-Mariner-Botazurelinux-securityjykanase
authored
[AUTO-CHERRYPICK] [AutoPR- Security] Patch jq for CVE-2025-48060 [HIGH] - branch 3.0-dev (microsoft#14391)
Co-authored-by: Azure Linux Security Servicing Account <[email protected]> Co-authored-by: jykanase <[email protected]>
1 parent 0449245 commit 1b72799

File tree

2 files changed

+49
-1
lines changed

2 files changed

+49
-1
lines changed

SPECS/jq/CVE-2025-48060.patch

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
From b87793372b4a54b49fcb56b60e9b0f29795f521a Mon Sep 17 00:00:00 2001
2+
From: Azure Linux Security Servicing Account
3+
4+
Date: Wed, 23 Jul 2025 03:35:30 +0000
5+
Subject: [PATCH] Fix CVE CVE-2025-48060 in jq
6+
7+
Upstream Patch Reference: https://github.com/jqlang/jq/commit/c6e041699d8cd31b97375a2596217aff2cfca85b.patch
8+
---
9+
src/jv.c | 1 +
10+
tests/jq.test | 4 ++++
11+
2 files changed, 5 insertions(+)
12+
13+
diff --git a/src/jv.c b/src/jv.c
14+
index 15990f1..18dbb54 100644
15+
--- a/src/jv.c
16+
+++ b/src/jv.c
17+
@@ -1125,6 +1125,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 = {JVP_FLAGS_STRING, 0, 0, 0, {&s->refcnt}};
23+
return r;
24+
}
25+
diff --git a/tests/jq.test b/tests/jq.test
26+
index cd650d4..500e741 100644
27+
--- a/tests/jq.test
28+
+++ b/tests/jq.test
29+
@@ -2031,6 +2031,10 @@ map(try implode catch .)
30+
[123,["a"],[nan]]
31+
["implode input must be an array","string (\"a\") can't be imploded, unicode codepoint needs to be numeric","number (null) can't be imploded, unicode codepoint needs to be numeric"]
32+
33+
+try 0[implode] catch .
34+
+[]
35+
+"Cannot index number with string \"\""
36+
+
37+
# walk
38+
walk(.)
39+
{"x":0}
40+
--
41+
2.45.2
42+

SPECS/jq/jq.spec

Lines changed: 7 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.7.1
4-
Release: 3%{?dist}
4+
Release: 4%{?dist}
55
Group: Applications/System
66
Vendor: Microsoft Corporation
77
License: MIT
88
URL: https://jqlang.github.io/jq/
99
Source0: https://github.com/jqlang/jq/releases/download/%{name}-%{version}/%{name}-%{version}.tar.gz
1010
Patch0: CVE-2024-53427.patch
1111
Patch1: CVE-2024-23337.patch
12+
Patch2: CVE-2025-48060.patch
1213
Distribution: Azure Linux
1314
BuildRequires: bison
1415
BuildRequires: chrpath
@@ -53,6 +54,7 @@ make check
5354
%license COPYING
5455
%{_bindir}/*
5556
%{_datadir}/*
57+
%exclude %{_datadir}/doc/jq/COPYING
5658
%{_libdir}/libjq.so.*
5759
%{_libdir}/pkgconfig/libjq.pc
5860

@@ -61,6 +63,10 @@ make check
6163
%{_includedir}/*
6264

6365
%changelog
66+
* Wed Jul 23 2025 Azure Linux Security Servicing Account <[email protected]> - 1.7.1-4
67+
- Patch for CVE-2025-48060
68+
- Updated files section to fix duplicated license files
69+
6470
* Mon May 26 2025 Akhila Guruju <[email protected]> - 1.7.1-3
6571
- Patch CVE-2024-23337
6672

0 commit comments

Comments
 (0)