Exploit database

GH-945bd5267b0d1b94c3f74faf5cda7e5a

blkph0x/cve-2026-83844_poc

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2026-83844

5 sources

Preferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source

Repository files579
blkph0x/cve-2026-83844_pocRevision 193ed44859da
Next files →

Files from this repository share one source choice. Supporting files may cover other vulnerabilities.

lab/trace/stage_provenance_stress_trial.ps1

PowerShell · 8,382 bytes
param(
    [Parameter(Mandatory = $true)]
    [ValidateSet('old', 'new')]
    [string]$Build,
    [Parameter(Mandatory = $true)]
    [ValidatePattern('^[a-z0-9][a-z0-9-]{0,39}$')]
    [string]$TrialLabel,
    [switch]$ValidateOnly,
    [ValidateSet('none', 'late-reject', 'copy-reject', 'status-origin', 'status36-edge', 'superbox-status36', 'max-exception', 'xlmax-allocation', 'new-status')]
    [string]$DiagnosticMode = 'none',
    [string]$CaseIds = 'stress_late_jumd_short7,stress_final_cbor_truncated16,stress_depth2_wrap_late_jumb,stress_outer_lbox_u32_max'
)

# Stage-only wrapper. It never starts a Sandbox or attaches to Paint.
$ErrorActionPreference = 'Stop'
if ($CaseIds -notmatch '^[a-z0-9_]+(,[a-z0-9_]+)*$') {
    throw 'CaseIds must be comma-separated safe IDs.'
}
$labRoot = (Resolve-Path -LiteralPath (Join-Path $PSScriptRoot '..')).Path
$fixtureDir = Join-Path $labRoot 'corpus\provenance_stress\generated'
$fixtureManifestPath = Join-Path $fixtureDir 'manifest.json'
$manifest = Get-Content -LiteralPath $fixtureManifestPath -Raw | ConvertFrom-Json
if ($manifest.schema -ne 'paint-ab-jumbf-stress-fixtures-v1' -or
    @($manifest.cases).Count -ne 13) {
    throw 'Unexpected stress fixture manifest.'
}
$stressCases = @($CaseIds.Split(','))
if ($stressCases.Count -lt 1 -or $stressCases.Count -gt 8 -or
    $stressCases.Count -ne @($stressCases | Select-Object -Unique).Count) {
    throw 'Select one to eight distinct stress cases per bounded guest.'
}
if ($DiagnosticMode -ne 'none') {
    $expected = switch ($DiagnosticMode) {
        'late-reject' { 'stress_final_cbor_lbox_u32_max' }
        'copy-reject' { 'stress_second_jumb_overlap_plus1' }
        'status-origin' { 'stress_second_jumb_overlap_plus1' }
        'status36-edge' { 'stress_second_jumb_overlap_plus1' }
        'superbox-status36' { 'stress_second_jumb_overlap_plus1' }
        'max-exception' { 'stress_outer_xlbox_u64_max' }
        'xlmax-allocation' { 'stress_outer_xlbox_u64_max' }
        'new-status' { 'stress_outer_xlbox_u64_max' }
    }
    $expectedBuild = if ($DiagnosticMode -eq 'new-status') { 'new' } else { 'old' }
    if ($Build -ne $expectedBuild -or $stressCases.Count -ne 1 -or $stressCases[0] -cne $expected) {
        throw "Diagnostic $DiagnosticMode requires $expectedBuild Paint and only $expected."
    }
}
$controlId = '40_official_c2pa_jpeg'
$controlPath = Join-Path $labRoot 'corpus\generated\40_official_c2pa_jpeg.jpg'
if ((Get-FileHash -LiteralPath $controlPath -Algorithm SHA256).Hash.ToLowerInvariant() -ne
    [string]$manifest.source_sha256) {
    throw 'Pinned same-guest C2PA positive control digest differs.'
}
$selected = @($controlId) + $stressCases
$focusCaseIds = $selected -join ','
$rows = @()
foreach ($id in $stressCases) {
    $matches = @($manifest.cases | Where-Object { $_.id -eq $id })
    if ($matches.Count -ne 1) { throw "Unknown or duplicate stress fixture: $id" }
    $case = $matches[0]
    if ($case.file -notmatch '^stress_[a-z0-9_]+\.jpg$') { throw 'Unsafe fixture filename.' }
    $path = Join-Path $fixtureDir $case.file
    if ((Get-FileHash -LiteralPath $path -Algorithm SHA256).Hash.ToLowerInvariant() -ne
        [string]$case.sha256 -or (Get-Item -LiteralPath $path).Length -ne [long]$case.bytes) {
        throw "Fixture digest or size mismatch: $id"
    }
    $rows += $case
}
& python (Join-Path $labRoot 'corpus\provenance_stress\verify_stress_fixtures.py') --check-c2pa | Out-Null
if ($LASTEXITCODE -ne 0) { throw 'Independent stress fixture verification failed.' }

$profileDir = if ($DiagnosticMode -eq 'none') {
    Join-Path $labRoot 'output\provenance-stress'
} else {
    Join-Path $labRoot "output\provenance-$DiagnosticMode"
}
$profilePath = Join-Path $profileDir "$Build.auto.cdb.txt"
$builderArgs = if ($DiagnosticMode -eq 'none') {
    $builder = Join-Path $PSScriptRoot 'build_provenance_deep_traces.py'
    $argsForBuilder = @($builder, '--profile', $Build, '--output', $profilePath)
    if ($Build -eq 'old') { $argsForBuilder += @('--repeat-old-header', '--repeat-old-payload') }
    $argsForBuilder
} elseif ($DiagnosticMode -eq 'new-status') {
    $builder = Join-Path $PSScriptRoot 'build_provenance_new_status_profile.py'
    @($builder, '--output', $profilePath)
} else {
    $builder = Join-Path $PSScriptRoot 'build_provenance_heap_diagnostics.py'
    @($builder, '--mode', $DiagnosticMode, '--output', $profilePath)
}
& python @builderArgs | Out-Null
if ($LASTEXITCODE -ne 0 -or
    -not (Test-Path -LiteralPath $profilePath -PathType Leaf) -or
    -not (Test-Path -LiteralPath "$profilePath.json" -PathType Leaf)) {
    throw 'Offline debugger profile generation failed.'
}
$profileManifest = Get-Content -LiteralPath "$profilePath.json" -Raw | ConvertFrom-Json
if ($profileManifest.profile -ne $Build -or -not $profileManifest.auto_continue -or
    ($DiagnosticMode -ne 'none' -and $profileManifest.diagnostic_mode -ne $DiagnosticMode)) {
    throw 'Debugger manifest is not compatible with selected diagnostic.'
}
if ($ValidateOnly) {
    Write-Output "Verified $Build stress fixtures and debugger profile; staging skipped."
    return
}
if (@(Get-Process -Name WindowsSandbox,WindowsSandboxClient -ErrorAction SilentlyContinue).Count -ne 0) {
    throw 'A guest is active; do not replace mapped input.'
}
$wsbPath = (& (Join-Path $labRoot 'isolation\prepare-sandbox.ps1') `
    -Build $Build -CorpusMode None -FocusedTrace -FocusCases $focusCaseIds `
    -Networking Enable -VGpu Disable -TrialLabel $TrialLabel | Select-Object -Last 1)
if (-not (Test-Path -LiteralPath $wsbPath -PathType Leaf)) {
    throw 'Shared preparer did not create a guest configuration.'
}
$inputDir = Join-Path $labRoot "isolation\input\$Build"
$traceDest = Join-Path $inputDir 'trace'
$followupDest = Join-Path $inputDir 'followup'
Copy-Item -LiteralPath $profilePath -Destination (Join-Path $traceDest "$Build.auto.cdb.txt") -Force
Copy-Item -LiteralPath "$profilePath.json" -Destination (Join-Path $traceDest "$Build.auto.cdb.txt.json") -Force
$followupManifestPath = Join-Path $followupDest 'manifest.json'
$followup = Get-Content -LiteralPath $followupManifestPath -Raw | ConvertFrom-Json
if ($followup.schema -ne 'paint-action-fixtures-v1') { throw 'Unexpected staged follow-up manifest.' }
foreach ($case in $rows) {
    if (@($followup.cases | Where-Object { $_.id -eq $case.id }).Count -ne 0) {
        throw "Duplicate staged fixture ID: $($case.id)"
    }
    $staged = Join-Path $followupDest $case.file
    Copy-Item -LiteralPath (Join-Path $fixtureDir $case.file) -Destination $staged -Force
    if ((Get-FileHash -LiteralPath $staged -Algorithm SHA256).Hash.ToLowerInvariant() -ne
        [string]$case.sha256) { throw "Staged fixture hash mismatch: $($case.id)" }
    $followup.cases += [pscustomobject]@{
        id = $case.id; file = $case.file; sha256 = $case.sha256;
        size = $case.bytes; format = 'JPEG'; raster_valid_control = $true
    }
}
$followup | ConvertTo-Json -Depth 10 |
    Set-Content -LiteralPath $followupManifestPath -Encoding UTF8
[xml]$config = Get-Content -LiteralPath $wsbPath -Raw
$command = [string]$config.Configuration.LogonCommand.Command
if ($command -notlike '*guest_focus_entry.ps1*' -or
    $command -notlike "*-CaseIds $focusCaseIds*") {
    throw 'Guest command does not select the bounded stress cases.'
}
$sidecar = [ordered]@{
    schema = 'paint-ab-provenance-stress-stage-v1'
    build = $Build; trial_label = $TrialLabel; selected_cases = $selected
    positive_control = $controlId; stress_case_count = $stressCases.Count
    diagnostic_mode = $DiagnosticMode
    networking = 'Enable'
    wsb_sha256 = (Get-FileHash -LiteralPath $wsbPath -Algorithm SHA256).Hash.ToLowerInvariant()
    profile_sha256 = (Get-FileHash -LiteralPath $profilePath -Algorithm SHA256).Hash.ToLowerInvariant()
    profile_manifest_sha256 = (Get-FileHash -LiteralPath "$profilePath.json" -Algorithm SHA256).Hash.ToLowerInvariant()
    fixture_manifest_sha256 = (Get-FileHash -LiteralPath $fixtureManifestPath -Algorithm SHA256).Hash.ToLowerInvariant()
    staged_followup_manifest_sha256 = (Get-FileHash -LiteralPath $followupManifestPath -Algorithm SHA256).Hash.ToLowerInvariant()
}
$sidecar | ConvertTo-Json -Depth 5 | Set-Content -LiteralPath (
    Join-Path $labRoot "isolation\generated\$TrialLabel.provenance-stress-stage.json") -Encoding UTF8
Write-Output $wsbPath