leptris 1.9.434.0-arm-linux → 1.9.435.0-arm-linux
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Rakefile +1 -1
- data/lib/leptris/version.rb +1 -1
- data/lib/libleptris.so +0 -0
- data/vendor-src/README.md +1 -1
- data/vendor-src/libleptris/CHANGELOG.md +17 -0
- data/vendor-src/libleptris/CMakeLists.txt +1 -1
- data/vendor-src/libleptris/src/include/leptris.h +2 -2
- data/vendor-src/libleptris/src/leptris/core.c +2 -2
- data/vendor-src/libleptris/src/leptris/html/html_parse.c +19 -0
- data/vendor-src/libleptris/test/fuzz/corpus/html_explicit_head_table.bin +0 -0
- data/vendor-src/libleptris/test/html/test_html_amplification.cpp +43 -0
- data/vendor-src/libleptris/vcpkg.json +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 91d1a8a93f30322eac3e925c0c72bdf563a379d178e0654c2d423abcbba296d8
|
|
4
|
+
data.tar.gz: 15e25c7591194a83a981f3e516505de17e22913275944eced99bdcf9ad5265bf
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3d5936313dd216510d57f399852138befefa41a080d66dadab394d153c6ed2cd3ab110a3470e61306c30321ba73b1370ad26a03acd8f1e0fa145cd9ba89b5439
|
|
7
|
+
data.tar.gz: 51821f6f89c82135fa77b875db568f1e3ab0dfa90b346344037b899a56368470c18db021e6f360bb6231b7ccbfc1c3961ca5730b5ce92d981858c979df05e1ff
|
data/Rakefile
CHANGED
|
@@ -8,7 +8,7 @@ RSpec::Core::RakeTask.new(:spec)
|
|
|
8
8
|
# Pin for `rake compile` and the platform-gem builds. Keep in lockstep
|
|
9
9
|
# with .github/workflows/build.yml (which calls `rake compile`) and the
|
|
10
10
|
# CHANGELOG when libleptris releases.
|
|
11
|
-
LIBLEPTRIS_VERSION = "1.9.
|
|
11
|
+
LIBLEPTRIS_VERSION = "1.9.435"
|
|
12
12
|
|
|
13
13
|
# THE SSOT for the per-minor native bundle list (ruby#645): one line,
|
|
14
14
|
# space-separated, consumed by the Rakefile, the per-minor builder's
|
data/lib/leptris/version.rb
CHANGED
data/lib/libleptris.so
CHANGED
|
Binary file
|
data/vendor-src/README.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
## [Unreleased]
|
|
2
2
|
|
|
3
|
+
## [1.9.435] - 2026-11-22
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- html: the document-assembly pass adopted an explicit `<head>` while
|
|
8
|
+
its head-run walk continued past it, re-parenting the head element
|
|
9
|
+
under itself — head's chain looped head->head->body and every walker
|
|
10
|
+
(serialize included) circled forever on a 41-byte input (libFuzzer
|
|
11
|
+
reported a 1748-second timeout). The adoption now cuts the head out
|
|
12
|
+
of the run chain; the minimized input is pinned to the fuzz corpus
|
|
13
|
+
and a bounded-walk spec covers the family (#2125).
|
|
14
|
+
- fuzz-nightly: the crash upload now carries every libFuzzer artifact
|
|
15
|
+
class (crash-*/timeout-*/oom-*/leak-*) — the timeout repro had been
|
|
16
|
+
written and thrown away for four consecutive nights.
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
3
20
|
## [1.9.434] - 2026-11-22
|
|
4
21
|
|
|
5
22
|
### Fixed
|
|
@@ -4207,8 +4207,8 @@ LEPTRIS_API const char* leptris_xinclude_get_encoding(LeptrisElement include_ele
|
|
|
4207
4207
|
* CI's export-surface gate diffs the header against the binary. */
|
|
4208
4208
|
#define LIBLEPTRIS_VERSION_MAJOR 1
|
|
4209
4209
|
#define LIBLEPTRIS_VERSION_MINOR 9
|
|
4210
|
-
#define LIBLEPTRIS_VERSION_PATCH
|
|
4211
|
-
#define LIBLEPTRIS_VERSION_STRING "1.9.
|
|
4210
|
+
#define LIBLEPTRIS_VERSION_PATCH 435
|
|
4211
|
+
#define LIBLEPTRIS_VERSION_STRING "1.9.435"
|
|
4212
4212
|
|
|
4213
4213
|
/**
|
|
4214
4214
|
* Get libleptris version string
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
* reaches here via target_compile_definitions in src/CMakeLists.txt.
|
|
22
22
|
* Fallback keeps hand-built compilers honest. */
|
|
23
23
|
#ifndef LEPTRIS_VERSION
|
|
24
|
-
#define LEPTRIS_VERSION "1.9.
|
|
24
|
+
#define LEPTRIS_VERSION "1.9.435"
|
|
25
25
|
#endif
|
|
26
26
|
#ifndef LEPTRIS_VERSION_MAJOR
|
|
27
27
|
#define LEPTRIS_VERSION_MAJOR 1
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
#define LEPTRIS_VERSION_MINOR 9
|
|
31
31
|
#endif
|
|
32
32
|
#ifndef LEPTRIS_VERSION_PATCH
|
|
33
|
-
#define LEPTRIS_VERSION_PATCH
|
|
33
|
+
#define LEPTRIS_VERSION_PATCH 435
|
|
34
34
|
#endif
|
|
35
35
|
|
|
36
36
|
/* Thread-local allocator hooks (TODO 27/74).
|
|
@@ -5361,11 +5361,29 @@ head_end = leptris_node_get_next_sibling(head_end);
|
|
|
5361
5361
|
html_first_new = head;
|
|
5362
5362
|
size_t hn = 0;
|
|
5363
5363
|
LeptrisNodeRef hlast = NULL;
|
|
5364
|
+
LeptrisNodeRef run_prev = NULL;
|
|
5364
5365
|
for (LeptrisNodeRef c = head_start;
|
|
5365
5366
|
c && c != (adopt && !run_after_explicit
|
|
5366
5367
|
? explicit_head
|
|
5367
5368
|
: head_end); ) {
|
|
5368
5369
|
LeptrisNodeRef next = leptris_node_get_next_sibling(c);
|
|
5370
|
+
if (adopt && c == (LeptrisNodeRef)explicit_head) {
|
|
5371
|
+
/* The adopted head cannot move under itself.
|
|
5372
|
+
* With run_after_explicit the walk continues
|
|
5373
|
+
* PAST it — cut it out of the run chain (the
|
|
5374
|
+
* bridge keeps head_start..hlast contiguous)
|
|
5375
|
+
* or the re-parent writes head as its own
|
|
5376
|
+
* child and every walker circles forever (the
|
|
5377
|
+
* fuzz-nightly timeout of 2026-11-19..22:
|
|
5378
|
+
* head's chain looped head->head->body on a
|
|
5379
|
+
* 41-byte input). */
|
|
5380
|
+
if (run_prev)
|
|
5381
|
+
leptris_node_set_next_sibling(run_prev, next);
|
|
5382
|
+
else
|
|
5383
|
+
head_start = next;
|
|
5384
|
+
c = next;
|
|
5385
|
+
continue;
|
|
5386
|
+
}
|
|
5369
5387
|
/* The run can carry comments (WHATWG in-head) —
|
|
5370
5388
|
* set_parent must go through the node-kind setter,
|
|
5371
5389
|
* an element-shaped write corrupts them. */
|
|
@@ -5389,6 +5407,7 @@ head_end = leptris_node_get_next_sibling(head_end);
|
|
|
5389
5407
|
break;
|
|
5390
5408
|
}
|
|
5391
5409
|
hlast = c;
|
|
5410
|
+
run_prev = c;
|
|
5392
5411
|
hn++;
|
|
5393
5412
|
c = next;
|
|
5394
5413
|
}
|
|
Binary file
|
|
@@ -76,3 +76,46 @@ TEST(HtmlTreeAmplification, ReconstructionNestStaysBounded) {
|
|
|
76
76
|
leptris_document_free(d);
|
|
77
77
|
EXPECT_LT(n, 1000u) << "the tree must stay bounded for this input";
|
|
78
78
|
}
|
|
79
|
+
|
|
80
|
+
/* The fuzz-nightly timeout family (2026-11-19..22): an
|
|
81
|
+
* explicit <head> token spliced into the table region made the
|
|
82
|
+
* document-assembly pass ADOPT the head element while its head-run
|
|
83
|
+
* walk continued PAST it — the move loop re-parented the head element
|
|
84
|
+
* under ITSELF (head's child chain looped head->head->body), and the
|
|
85
|
+
* whole tree walk (serialize included) circled forever on a 41-byte
|
|
86
|
+
* input. Per WHATWG the <head> start tag in table context is a parse
|
|
87
|
+
* error to ignore; the assembly must never adopt a run that contains
|
|
88
|
+
* the adopted element itself. */
|
|
89
|
+
TEST(HtmlTreeAmplification, ExplicitHeadInTableStaysBounded) {
|
|
90
|
+
static const char trig[] =
|
|
91
|
+
"<meta ct=utf ><table DAPPER=1 =otel><head></html>";
|
|
92
|
+
size_t len = sizeof(trig) - 1;
|
|
93
|
+
LeptrisStatus st = LEPTRIS_OK;
|
|
94
|
+
LeptrisDocument d = leptris_parse_html_string(trig, len, &st);
|
|
95
|
+
ASSERT_NE(d, nullptr);
|
|
96
|
+
Seen s;
|
|
97
|
+
memset(&s, 0, sizeof(s));
|
|
98
|
+
size_t n = 0;
|
|
99
|
+
LeptrisNodeRef root = (LeptrisNodeRef)leptris_document_root(d);
|
|
100
|
+
ASSERT_TRUE(walk_tree(root, s, n))
|
|
101
|
+
<< "the head-run adoption must never link head under itself";
|
|
102
|
+
leptris_document_free(d);
|
|
103
|
+
EXPECT_LT(n, 100u) << "the tree must stay bounded for this input";
|
|
104
|
+
|
|
105
|
+
/* The same shape with the table carrying the run past an
|
|
106
|
+
* explicit <head> (the 758-byte nightly mutant's core). */
|
|
107
|
+
static const char trig2[] =
|
|
108
|
+
"<!DOCTYPE html><html><head><meta charset=utf-8><title>t</title>"
|
|
109
|
+
"</heai><body><table DATA-UPPER=1 =dinoquotes style=\"color:red\">"
|
|
110
|
+
"<!-- comment 0 --><li><tr><img s</style></body></hs #DATA-UPPER=1 "
|
|
111
|
+
"disabled>af (a<b) x();</script><head><meta charset=utf-8></html>";
|
|
112
|
+
LeptrisDocument d2 = leptris_parse_html_string(
|
|
113
|
+
trig2, sizeof(trig2) - 1, &st);
|
|
114
|
+
ASSERT_NE(d2, nullptr);
|
|
115
|
+
Seen s2;
|
|
116
|
+
memset(&s2, 0, sizeof(s2));
|
|
117
|
+
size_t n2 = 0;
|
|
118
|
+
ASSERT_TRUE(walk_tree((LeptrisNodeRef)leptris_document_root(d2), s2, n2))
|
|
119
|
+
<< "the full nightly shape must stay acyclic";
|
|
120
|
+
leptris_document_free(d2);
|
|
121
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg/master/scripts/vcpkg.schema.json",
|
|
3
3
|
"name": "leptris",
|
|
4
|
-
"version": "1.9.
|
|
4
|
+
"version": "1.9.435",
|
|
5
5
|
"description": "High-performance XML parser and XPath 1.0 engine in C (libleptris)",
|
|
6
6
|
"homepage": "https://github.com/leptris/leptris",
|
|
7
7
|
"license": "MIT",
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: leptris
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.9.
|
|
4
|
+
version: 1.9.435.0
|
|
5
5
|
platform: arm-linux
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
@@ -900,6 +900,7 @@ files:
|
|
|
900
900
|
- vendor-src/libleptris/test/fuzz/corpus/gen/gen_0037.xsl
|
|
901
901
|
- vendor-src/libleptris/test/fuzz/corpus/gen/gen_0038.xsl
|
|
902
902
|
- vendor-src/libleptris/test/fuzz/corpus/gen/gen_0039.xsl
|
|
903
|
+
- vendor-src/libleptris/test/fuzz/corpus/html_explicit_head_table.bin
|
|
903
904
|
- vendor-src/libleptris/test/fuzz/corpus/html_foreign_cdata_short_opener.bin
|
|
904
905
|
- vendor-src/libleptris/test/fuzz/corpus/html_reconstruction_nest_min.bin
|
|
905
906
|
- vendor-src/libleptris/test/fuzz/corpus/html_tree_amplification_timeout.bin
|