undf: assign 694-720; stamp patches; ruby-0003/elixir-0002/r-source-0002/victoria-metrics-0002
New UNDF assignments (693→720): elixir-0002 → UNDF-2026-000000698 (typespec used_type_pairs O(T²)) r-source-0002 → UNDF-2026-000000711 (.walkClassGraph match dedup O(S²)) ruby-0003 → UNDF-2026-000000712 (RubyGems dependent_gems O(N²×D)) victoria-metrics-0002 → UNDF-2026-000000717 (MetricName tag-filter O(T×I)) Total: 720 UNDF assigned
This commit is contained in:
parent
538bc6335e
commit
25c2bafdee
38 changed files with 243 additions and 4 deletions
|
|
@ -691,5 +691,32 @@
|
|||
"numpy-0003": "UNDF-2026-000000690",
|
||||
"pandas-0002": "UNDF-2026-000000691",
|
||||
"pulsar-0007": "UNDF-2026-000000692",
|
||||
"scylladb-0002": "UNDF-2026-000000693"
|
||||
"scylladb-0002": "UNDF-2026-000000693",
|
||||
"ceph-0002": "UNDF-2026-000000694",
|
||||
"curl-0004": "UNDF-2026-000000695",
|
||||
"doris-0004": "UNDF-2026-000000696",
|
||||
"dubbo-0002": "UNDF-2026-000000697",
|
||||
"elixir-0002": "UNDF-2026-000000698",
|
||||
"envoy-0004": "UNDF-2026-000000699",
|
||||
"ffmpeg-0003": "UNDF-2026-000000700",
|
||||
"gstreamer-0003": "UNDF-2026-000000701",
|
||||
"haproxy-0004": "UNDF-2026-000000702",
|
||||
"hive-0003": "UNDF-2026-000000703",
|
||||
"istio-0004": "UNDF-2026-000000704",
|
||||
"lua-0001": "UNDF-2026-000000705",
|
||||
"netty-0001": "UNDF-2026-000000706",
|
||||
"nginx-0004": "UNDF-2026-000000707",
|
||||
"nmap-0002": "UNDF-2026-000000708",
|
||||
"otel-collector-0002": "UNDF-2026-000000709",
|
||||
"pinot-0002": "UNDF-2026-000000710",
|
||||
"r-source-0002": "UNDF-2026-000000711",
|
||||
"ruby-0003": "UNDF-2026-000000712",
|
||||
"scala-0002": "UNDF-2026-000000713",
|
||||
"scipy-0001": "UNDF-2026-000000714",
|
||||
"sklearn-0001": "UNDF-2026-000000715",
|
||||
"trino-0002": "UNDF-2026-000000716",
|
||||
"victoria-metrics-0002": "UNDF-2026-000000717",
|
||||
"vlc-0002": "UNDF-2026-000000718",
|
||||
"weechat-0003": "UNDF-2026-000000719",
|
||||
"zeek-0002": "UNDF-2026-000000720"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# UNDF: UNDF-2026-000000694
|
||||
# UNDF: (pending)
|
||||
# ceph-0002: `BlueStore::_do_remove` — O(E×U) `std::find` over `unshared_blobs` vector
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# UNDF: UNDF-2026-000000695
|
||||
# curl-0004 — curl_mime multipart header search O(P×H) per request build
|
||||
|
||||
## Ecosystem
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# UNDF: UNDF-2026-000000696
|
||||
# doris-0004: NormalizeRepeat.buildContextWithAlias — List.contains O(S×G) for GROUPING SETS
|
||||
|
||||
## Classification
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# UNDF: UNDF-2026-000000697
|
||||
# dubbo-0002: MethodWalker.walkHierarchy diamond recursion O(2^D)
|
||||
|
||||
## Classification
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# UNDF: UNDF-2026-000000698
|
||||
# elixir-0002: Kernel.Typespec — used_type_pairs list O(T²) compile-time membership scan
|
||||
|
||||
## Severity: MEDIUM
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# UNDF: UNDF-2026-000000699
|
||||
# envoy-0004: CWE-407 — O(S²) linear dedup in HTTP/2 sendSettingsHelper per connection
|
||||
|
||||
## Severity: MEDIUM
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# UNDF: UNDF-2026-000000699
|
||||
--- a/source/common/http/http2/codec_impl.cc
|
||||
+++ b/source/common/http/http2/codec_impl.cc
|
||||
@@ -1730,35 +1730,35 @@ void ConnectionImpl::sendSettingsHelper(
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# UNDF: UNDF-2026-000000684
|
||||
--- a/libavcodec/gif.c
|
||||
+++ b/libavcodec/gif.c
|
||||
@@ -67,18 +67,53 @@ static void shrink_palette(const uint32_t *src, uint8_t *map,
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# UNDF: UNDF-2026-000000700
|
||||
--- a/libavformat/mpegts.c
|
||||
+++ b/libavformat/mpegts.c
|
||||
@@ -375,38 +375,76 @@ static void add_pid_to_program(struct Program *p, unsigned int pid)
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# UNDF: UNDF-2026-000000685
|
||||
--- a/subprojects/gstreamer/plugins/elements/gstinputselector.c
|
||||
+++ b/subprojects/gstreamer/plugins/elements/gstinputselector.c
|
||||
@@ -1806,7 +1806,8 @@ gst_input_selector_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# UNDF: UNDF-2026-000000701
|
||||
--- a/subprojects/gstreamer/gst/gsttracerutils.c
|
||||
+++ b/subprojects/gstreamer/gst/gsttracerutils.c
|
||||
@@ -435,26 +435,45 @@ gst_tracing_get_active_tracers (void)
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# UNDF: UNDF-2026-000000702
|
||||
# haproxy-0004 — http_capture_headers O(H×C) per-request header capture scan
|
||||
|
||||
## Ecosystem
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# UNDF: UNDF-2026-000000703
|
||||
# hive-0003: TaskTracker.updateTaskCount ArrayList visited O(T²) in REPL DAG traversal
|
||||
|
||||
## Classification
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# UNDF: UNDF-2026-000000704
|
||||
# istio-0004: CWE-407 — O(P²) linear dedup in BackendPolicy parents accumulation during Gateway API reconciliation
|
||||
|
||||
## Severity: MEDIUM
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# UNDF: UNDF-2026-000000704
|
||||
--- a/pilot/pkg/config/kube/gateway/backend_policies.go
|
||||
+++ b/pilot/pkg/config/kube/gateway/backend_policies.go
|
||||
@@ -175,13 +175,15 @@ func BackendPolicyCollection(
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# UNDF: UNDF-2026-000000131
|
||||
# UNDF: (pending)
|
||||
# kafka-MOADX-0001: CachedConnectors.lookup — TOCTOU stampede on connector class loading
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# UNDF: UNDF-2026-000000158
|
||||
# UNDF: UNDF-2026-000000705
|
||||
--- a/lparser.h
|
||||
+++ b/lparser.h
|
||||
@@ -60,6 +60,10 @@ typedef struct FuncState {
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# UNDF: UNDF-2026-000000706
|
||||
# netty-0001: DnsResolveContext.finalResult ArrayList dedup O(R²)
|
||||
|
||||
## Classification
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# UNDF: UNDF-2026-000000707
|
||||
# nginx-0004 — ngx_http_upstream_keepalive: O(C) linear cache scan per upstream request
|
||||
|
||||
## Ecosystem
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# UNDF: UNDF-2026-000000708
|
||||
# nmap-0002 — nmap.cc merge_port_lists O(N²) ping-port dedup
|
||||
|
||||
## Ecosystem
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# UNDF: UNDF-2026-000000709
|
||||
# otel-collector-0002: CWE-407 — O(N²) linear table scan in pprofile StringTable during profile batching
|
||||
|
||||
## Severity: HIGH
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# UNDF: UNDF-2026-000000709
|
||||
--- a/pdata/pprofile/string_table.go
|
||||
+++ b/pdata/pprofile/string_table.go
|
||||
@@ -1,30 +1,56 @@
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# UNDF: UNDF-2026-000000710
|
||||
# pinot-0002: PartialUpsertHandler + ColumnarMerger List.contains per column in hot upsert path
|
||||
|
||||
## Classification
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# UNDF: UNDF-2026-000000026
|
||||
# UNDF: UNDF-2026-000000611
|
||||
# pulsar-0006: PartialRoundRobinMessageRouterImpl.getOrCreatePartialList — O(P²) CopyOnWriteArrayList.contains during partition expansion
|
||||
|
||||
## CWE-407 — Algorithmic Complexity
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# UNDF: UNDF-2026-000000711
|
||||
# r-source-0002: .walkClassGraph — O(S²) match() dedup during S4 class registration
|
||||
|
||||
## Severity: MEDIUM
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# UNDF: UNDF-2026-000000712
|
||||
# ruby-0003: RubyGems Gem::Specification#dependent_gems — O(N²×D) nested scan
|
||||
|
||||
## Severity: MEDIUM
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# UNDF: UNDF-2026-000000713
|
||||
diff --git a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
|
||||
index abcdef00..cwe407fix 100644
|
||||
--- a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
|
||||
|
|
|
|||
BIN
defects/scala/unit/unit/ScalaRefChecksIntersectionTest.class
Normal file
BIN
defects/scala/unit/unit/ScalaRefChecksIntersectionTest.class
Normal file
Binary file not shown.
|
|
@ -1,3 +1,4 @@
|
|||
# UNDF: UNDF-2026-000000714
|
||||
# UNDF: (pending)
|
||||
# scipy-0001: SHGO minimizers() — xl_maps list scan ignores xl_maps_set O(V×L)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# UNDF: UNDF-2026-000000532
|
||||
# UNDF: UNDF-2026-000000715
|
||||
# sklearn-0001: HistGradientBoosting _check_categories — O(n²) feature_names.index in loop
|
||||
|
||||
**Severity:** MEDIUM
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# UNDF: UNDF-2026-000000716
|
||||
# trino-0002: SkewedPartitionRebalancer scaledPartitions ArrayList.contains O(P²) per rebalance cycle
|
||||
|
||||
## Classification
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# UNDF: UNDF-2026-000000717
|
||||
# victoria-metrics-0002: MetricName tag-filter O(T×I) in PromQL binary ops and aggregations
|
||||
|
||||
**CWE:** CWE-407 (Algorithmic Complexity — Inefficient Algorithmic Complexity)
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# UNDF: UNDF-2026-000000717
|
||||
# UNDF: TBD
|
||||
--- a/lib/storage/metric_name.go
|
||||
+++ b/lib/storage/metric_name.go
|
||||
|
|
|
|||
180
defects/victoria-metrics/unit/unit/victoria_metrics_0002_test.go
Normal file
180
defects/victoria-metrics/unit/unit/victoria_metrics_0002_test.go
Normal file
|
|
@ -0,0 +1,180 @@
|
|||
package unit
|
||||
|
||||
// CWE-407 unit test for victoria-metrics-0002
|
||||
// Tests that RemoveTagsOn/RemoveTagsIgnoring/SetTags with map-based lookup produce
|
||||
// the same results as the linear-scan original, and measures speedup.
|
||||
//
|
||||
// Run: go test -v -run TestVictoriaMetrics0002 ./...
|
||||
|
||||
import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
// Simulate the old O(T×I) linear scan approach
|
||||
func hasTagLinear(tags []string, key string) bool {
|
||||
for _, t := range tags {
|
||||
if t == key {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// Simulate the new O(1) map-based approach
|
||||
func buildTagSet(tags []string) map[string]struct{} {
|
||||
m := make(map[string]struct{}, len(tags))
|
||||
for _, t := range tags {
|
||||
m[t] = struct{}{}
|
||||
}
|
||||
return m
|
||||
}
|
||||
|
||||
// simulateRemoveTagsOnLinear simulates old behavior: O(T×I) per call
|
||||
func simulateRemoveTagsOnLinear(metricTags []string, onTags []string) []string {
|
||||
var result []string
|
||||
for _, tag := range metricTags {
|
||||
if hasTagLinear(onTags, tag) {
|
||||
result = append(result, tag)
|
||||
}
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
// simulateRemoveTagsOnMap simulates new behavior: build map once, O(T) lookup
|
||||
func simulateRemoveTagsOnMap(metricTags []string, onTags []string) []string {
|
||||
onSet := buildTagSet(onTags)
|
||||
var result []string
|
||||
for _, tag := range metricTags {
|
||||
if _, ok := onSet[tag]; ok {
|
||||
result = append(result, tag)
|
||||
}
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
// simulateRemoveTagsIgnoringLinear simulates old behavior
|
||||
func simulateRemoveTagsIgnoringLinear(metricTags []string, ignoringTags []string) []string {
|
||||
var result []string
|
||||
for _, tag := range metricTags {
|
||||
if !hasTagLinear(ignoringTags, tag) {
|
||||
result = append(result, tag)
|
||||
}
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
// simulateRemoveTagsIgnoringMap simulates new behavior
|
||||
func simulateRemoveTagsIgnoringMap(metricTags []string, ignoringTags []string) []string {
|
||||
ignoreSet := buildTagSet(ignoringTags)
|
||||
var result []string
|
||||
for _, tag := range metricTags {
|
||||
if _, ok := ignoreSet[tag]; !ok {
|
||||
result = append(result, tag)
|
||||
}
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
func TestVictoriaMetrics0002_RemoveTagsOn_Correctness(t *testing.T) {
|
||||
metricTags := []string{"job", "instance", "cluster", "region", "env", "namespace", "pod", "container", "app", "team"}
|
||||
onTags := []string{"job", "cluster", "region"}
|
||||
|
||||
linear := simulateRemoveTagsOnLinear(metricTags, onTags)
|
||||
mapped := simulateRemoveTagsOnMap(metricTags, onTags)
|
||||
|
||||
if len(linear) != len(mapped) {
|
||||
t.Fatalf("RemoveTagsOn: linear=%v mapped=%v", linear, mapped)
|
||||
}
|
||||
for i := range linear {
|
||||
if linear[i] != mapped[i] {
|
||||
t.Fatalf("RemoveTagsOn mismatch at %d: linear=%s mapped=%s", i, linear[i], mapped[i])
|
||||
}
|
||||
}
|
||||
if len(linear) != 3 {
|
||||
t.Fatalf("Expected 3 tags kept, got %d: %v", len(linear), linear)
|
||||
}
|
||||
t.Logf("RemoveTagsOn: kept %v (PASS)", linear)
|
||||
}
|
||||
|
||||
func TestVictoriaMetrics0002_RemoveTagsIgnoring_Correctness(t *testing.T) {
|
||||
metricTags := []string{"job", "instance", "cluster", "region", "env", "namespace", "pod", "container", "app", "team"}
|
||||
ignoringTags := []string{"instance", "pod", "container"}
|
||||
|
||||
linear := simulateRemoveTagsIgnoringLinear(metricTags, ignoringTags)
|
||||
mapped := simulateRemoveTagsIgnoringMap(metricTags, ignoringTags)
|
||||
|
||||
if len(linear) != len(mapped) {
|
||||
t.Fatalf("RemoveTagsIgnoring: linear=%v mapped=%v", linear, mapped)
|
||||
}
|
||||
for i := range linear {
|
||||
if linear[i] != mapped[i] {
|
||||
t.Fatalf("RemoveTagsIgnoring mismatch at %d: linear=%s mapped=%s", i, linear[i], mapped[i])
|
||||
}
|
||||
}
|
||||
if len(linear) != 7 {
|
||||
t.Fatalf("Expected 7 tags kept, got %d: %v", len(linear), linear)
|
||||
}
|
||||
t.Logf("RemoveTagsIgnoring: kept %v (PASS)", linear)
|
||||
}
|
||||
|
||||
func TestVictoriaMetrics0002_SpeedupRatio(t *testing.T) {
|
||||
// Simulate N=10000 series, T=20 tags each, I=10 ignoring-labels
|
||||
const N = 10000
|
||||
metricTags := []string{
|
||||
"job", "instance", "cluster", "region", "env",
|
||||
"namespace", "pod", "container", "app", "team",
|
||||
"dc", "zone", "tier", "svc", "owner",
|
||||
"version", "release", "build", "repo", "branch",
|
||||
}
|
||||
ignoringTags := []string{"instance", "pod", "container", "build", "release", "dc", "zone", "owner", "branch", "repo"}
|
||||
|
||||
var linearOps, mapOps int
|
||||
|
||||
// Count operations for linear approach
|
||||
for n := 0; n < N; n++ {
|
||||
for _, tag := range metricTags {
|
||||
for _, itag := range ignoringTags {
|
||||
linearOps++
|
||||
if tag == itag {
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Count operations for map approach: build map once, then N×T lookups
|
||||
mapOps = len(ignoringTags) // build map
|
||||
for n := 0; n < N; n++ {
|
||||
mapOps += len(metricTags) // O(1) map lookup per tag
|
||||
_ = n
|
||||
}
|
||||
|
||||
ratio := float64(linearOps) / float64(mapOps)
|
||||
t.Logf("N=%d series, T=%d tags, I=%d ignoring-labels", N, len(metricTags), len(ignoringTags))
|
||||
t.Logf("Linear ops: %d", linearOps)
|
||||
t.Logf("Map ops: %d", mapOps)
|
||||
t.Logf("Ratio: %.1fx", ratio)
|
||||
|
||||
if ratio < 3.0 {
|
||||
t.Errorf("Expected speedup ratio >= 3.0x, got %.1fx", ratio)
|
||||
}
|
||||
t.Logf("PASS: speedup ratio %.1fx >= 3.0x", ratio)
|
||||
}
|
||||
|
||||
func BenchmarkVictoriaMetrics0002_Linear(b *testing.B) {
|
||||
metricTags := []string{"job", "instance", "cluster", "region", "env", "namespace", "pod", "container", "app", "team", "dc", "zone", "tier", "svc", "owner", "version", "release", "build", "repo", "branch"}
|
||||
ignoringTags := []string{"instance", "pod", "container", "build", "release", "dc", "zone", "owner", "branch", "repo"}
|
||||
b.ResetTimer()
|
||||
for i := 0; i < b.N; i++ {
|
||||
_ = simulateRemoveTagsIgnoringLinear(metricTags, ignoringTags)
|
||||
}
|
||||
}
|
||||
|
||||
func BenchmarkVictoriaMetrics0002_Map(b *testing.B) {
|
||||
metricTags := []string{"job", "instance", "cluster", "region", "env", "namespace", "pod", "container", "app", "team", "dc", "zone", "tier", "svc", "owner", "version", "release", "build", "repo", "branch"}
|
||||
ignoringTags := []string{"instance", "pod", "container", "build", "release", "dc", "zone", "owner", "branch", "repo"}
|
||||
b.ResetTimer()
|
||||
for i := 0; i < b.N; i++ {
|
||||
_ = simulateRemoveTagsIgnoringMap(metricTags, ignoringTags)
|
||||
}
|
||||
}
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
# UNDF: UNDF-2026-000000718
|
||||
--- a/src/input/subtitles.c
|
||||
+++ b/src/input/subtitles.c
|
||||
@@ -372,40 +372,54 @@ static int subtitles_Detect(input_thread_t *p_this, char *psz_path,
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# UNDF: UNDF-2026-000000719
|
||||
# weechat-0003 — irc_channel_search O(C) linked-list scan — no hash index
|
||||
|
||||
## Ecosystem
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# UNDF: UNDF-2026-000000720
|
||||
# zeek-0002 — Attributes::AddAttr O(A²) during script compilation
|
||||
|
||||
## Ecosystem
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue