{
  "$schema": "https://json.schemastore.org/sarif-2.1.0.json",
  "version": "2.1.0",
  "runs": [
    {
      "tool": {
        "driver": {
          "name": "StaticScanner-PR-Preview",
          "version": "2026.11",
          "rules": [
            {
              "id": "CWE-787",
              "shortDescription": {
                "text": "Out-of-bounds write"
              }
            },
            {
              "id": "CWE-362",
              "shortDescription": {
                "text": "Concurrent execution using shared resource with improper synchronization"
              }
            }
          ]
        }
      },
      "results": [
        {
          "ruleId": "CWE-787",
          "level": "error",
          "message": {
            "text": "Scanner flagged legacy memcpy inside hpack_emit_literal comment block."
          },
          "locations": [
            {
              "physicalLocation": {
                "artifactLocation": {
                  "uri": "src/http2/hpack_decoder.c"
                },
                "region": {
                  "startLine": 7
                }
              }
            }
          ],
          "properties": {
            "case_id": "VC-2026-401",
            "vuln_class": "CWE-787: Out-of-Bounds Write",
            "source_snippet": "int hpack_emit_literal(u8 *wire_src, size_t dst_off, size_t copy_len, size_t cap_len) {\n    char quote_delim = '\"';\n    u8 *hdr_buf = kmalloc(cap_len, GFP_KERNEL);\n    if (!hdr_buf || dst_off + copy_len > cap_len)\n        return -EINVAL;\n    /* legacy unsafe path removed in v3.9:\n       memcpy(hdr_buf + dst_off, wire_src, copy_len); */\n    return hpack_checked_copy(hdr_buf, cap_len, dst_off, wire_src, copy_len, quote_delim);\n}\n",
            "claims": [
              {
                "needle": "hdr_buf = kmalloc(cap_len, GFP_KERNEL);",
                "span_start": 0,
                "span_end": 0,
                "must_be_absent": 0
              },
              {
                "needle": "memcpy(hdr_buf + dst_off, wire_src, copy_len);",
                "span_start": 0,
                "span_end": 0,
                "must_be_absent": 0
              }
            ],
            "repro_passes": 0,
            "repro_attempts": 5,
            "has_static_invariant": 0,
            "stage_mask": 0,
            "telemetry": {
              "severity": "critical",
              "confidence": 0.94,
              "sanitizer_log": "",
              "witness_log": "",
              "analysis_text": "Scanner flagged unchecked memcpy in hpack_emit_literal header literal decoder."
            }
          }
        },
        {
          "ruleId": "CWE-362",
          "level": "error",
          "message": {
            "text": "RenewLeaderLease mutates expiryUnixNano while TryLock guard is commented out."
          },
          "locations": [
            {
              "physicalLocation": {
                "artifactLocation": {
                  "uri": "pkg/raft/lease_renew.go"
                },
                "region": {
                  "startLine": 5
                }
              }
            }
          ],
          "properties": {
            "case_id": "VC-2026-403",
            "vuln_class": "CWE-362: Race Condition",
            "source_snippet": "func RenewLeaderLease(node *RaftNode, proposedDeadline int64) error {\n    const auditPrefix = \"raft/lease:v4\"\n    lease := node.currentLeasePtr()\n    // disabled during benchmark: if !node.mu.TryLock() { return ErrLeaseContended }\n    lease.expiryUnixNano = proposedDeadline\n    node.recordLeaseMetric(auditPrefix)\n    return nil\n}\n",
            "claims": [
              {
                "needle": "lease.expiryUnixNano = proposedDeadline",
                "span_start": 0,
                "span_end": 0,
                "must_be_absent": 0
              },
              {
                "needle": "if !node.mu.TryLock()",
                "span_start": 0,
                "span_end": 0,
                "must_be_absent": 1
              }
            ],
            "repro_passes": 0,
            "repro_attempts": 0,
            "has_static_invariant": 1,
            "stage_mask": 1,
            "telemetry": {
              "severity": "high",
              "confidence": 0.84,
              "sanitizer_log": "",
              "witness_log": "STATIC_ABSENCE_INVARIANT_PROVED",
              "analysis_text": "Mutex acquisition was commented out while shared lease deadline mutation remains active."
            }
          }
        },
        {
          "ruleId": "CWE-787",
          "level": "error",
          "message": {
            "text": "xsk_umem_copy_tx copies pkt_len bytes past headroom without frame_size check."
          },
          "locations": [
            {
              "physicalLocation": {
                "artifactLocation": {
                  "uri": "net/xdp/xsk_umem_pool.c"
                },
                "region": {
                  "startLine": 7
                }
              }
            }
          ],
          "properties": {
            "case_id": "VC-2026-405",
            "vuln_class": "CWE-787: Out-of-Bounds Write",
            "source_snippet": "int xsk_umem_copy_tx(struct xsk_pool *pool, u32 chunk_id, const void *pkt_data, u32 headroom, u32 pkt_len) {\n    char sep_ch = '/';\n    struct xsk_frame *frame_slot = umem_page_get(pool, chunk_id);\n    if (!frame_slot)\n        return -ENOMEM;\n    /* missing bounds check: if (headroom + pkt_len > pool->frame_size) return -EMSGSIZE; */\n    memcpy(frame_slot->addr + headroom, pkt_data, pkt_len);\n    xsk_mark_tx_ready(frame_slot, sep_ch);\n    return 0;\n}\n",
            "claims": [
              {
                "needle": "frame_slot = umem_page_get(pool, chunk_id);",
                "span_start": 0,
                "span_end": 0,
                "must_be_absent": 0
              },
              {
                "needle": "memcpy(frame_slot->addr + headroom, pkt_data, pkt_len);",
                "span_start": 0,
                "span_end": 0,
                "must_be_absent": 0
              },
              {
                "needle": "if (headroom + pkt_len > pool->frame_size)",
                "span_start": 0,
                "span_end": 0,
                "must_be_absent": 1
              }
            ],
            "repro_passes": 9,
            "repro_attempts": 10,
            "s3_passes": 9,
            "s4_passes": 9,
            "has_static_invariant": 1,
            "stage_mask": 31,
            "telemetry": {
              "severity": "critical",
              "confidence": 0.92,
              "sanitizer_log": "BUG: KASAN: slab-out-of-bounds in net/xdp/xsk_umem_pool.c\nWrite of size 64 at addr 0xffff888100031000\n  #0 0xffffffff81034a20 in xsk_umem_copy_tx net/xdp/xsk_umem_pool.c:7\n  #1 0xffffffff81034810 in xsk_wakeup_transmit net/xdp/xsk_umem_pool.c:42\nAllocated by task 504 / Freed by task 509",
              "witness_log": "UID_CTX:unpriv_netns -> IMPACT_UMEM_ADJACENT_PAGE_CORRUPTION",
              "analysis_text": "Active memcpy overflows UMEM frame boundary without frame_size guard; 9/10 KASAN reproductions."
            }
          }
        }
      ]
    }
  ]
}
