Security Vulnerability Report
中文
CVE-2026-34963 CVSS 8.4 HIGH

CVE-2026-34963

Published: 2026-05-11 23:19:48
Last Modified: 2026-05-11 23:19:48

Description

barebox version prior to 2026.04.0 contains multiple memory-safety vulnerabilities in the EFI PE loader in efi/loader/pe.c where integer overflow in virtual image size computation using 32-bit arithmetic on section VirtualAddress and size values allows undersized heap allocation, and PE section loading logic fails to validate that PointerToRawData plus copied size remains within the PE file buffer. An attacker can supply a malicious EFI PE binary via TFTP, USB, SD card, or network boot to trigger heap buffer overflow or out-of-bounds read from heap memory, potentially achieving code execution in bootloader context.

CVSS Details

CVSS Score
8.4
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Configurations (Affected Products)

No configuration data available.

barebox < 2026.04.0

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
#!/usr/bin/env python3 """ Conceptual PoC for CVE-2026-34963 This script demonstrates how to craft a malicious EFI PE binary to trigger the integer overflow in barebox EFI PE loader. Note: This requires a valid EFI base binary to work as a template. """ import struct import sys def create_malicious_pe(input_file, output_file): with open(input_file, 'rb') as f: data = bytearray(f.read()) # In a real scenario, we would parse the PE headers. # Here we simulate the overflow condition logic described. # The vulnerability is in computing image size using 32-bit arithmetic. # We want VirtualAddress + Size to overflow 32-bit. # Example: Setting a very high VirtualAddress and Size in a section header. # This is a placeholder for actual PE parsing logic. print(f"[+] Loading {input_file}") # Offset to Section Headers (simplified for PoC, usually after COFF/Optional header) # In a real exploit, one would parse the PE to find the .text or .data section # and modify the VirtualSize/PointerToRawData. # Simulate modifying a section header to trigger overflow: # VirtualAddress = 0xFFFF0000 # Size = 0x20000 # Sum = 0x100100000 -> truncated to 0x10000 in 32-bit arithmetic. # This would cause a tiny allocation but a large copy. print("[+] Modifying PE headers to trigger integer overflow...") # Write the modified binary with open(output_file, 'wb') as f: f.write(data) print(f"[+] Malicious PE written to {output_file}") print("[+] Use this file via TFTP/USB to boot the target barebox device.") if __name__ == "__main__": if len(sys.argv) < 3: print("Usage: python3 poc.py <input_efi> <output_efi>") sys.exit(1) create_malicious_pe(sys.argv[1], sys.argv[2])

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-34963", "sourceIdentifier": "[email protected]", "published": "2026-05-11T23:19:47.950", "lastModified": "2026-05-11T23:19:47.950", "vulnStatus": "Received", "cveTags": [], "descriptions": [{"lang": "en", "value": "barebox version prior to 2026.04.0 contains multiple memory-safety vulnerabilities in the EFI PE loader in efi/loader/pe.c where integer overflow in virtual image size computation using 32-bit arithmetic on section VirtualAddress and size values allows undersized heap allocation, and PE section loading logic fails to validate that PointerToRawData plus copied size remains within the PE file buffer. An attacker can supply a malicious EFI PE binary via TFTP, USB, SD card, or network boot to trigger heap buffer overflow or out-of-bounds read from heap memory, potentially achieving code execution in bootloader context."}], "metrics": {"cvssMetricV40": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "4.0", "vectorString": "CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X", "baseScore": 8.6, "baseSeverity": "HIGH", "attackVector": "LOCAL", "attackComplexity": "LOW", "attackRequirements": "NONE", "privilegesRequired": "NONE", "userInteraction": "NONE", "vulnConfidentialityImpact": "HIGH", "vulnIntegrityImpact": "HIGH", "vulnAvailabilityImpact": "HIGH", "subConfidentialityImpact": "NONE", "subIntegrityImpact": "NONE", "subAvailabilityImpact": "NONE", "exploitMaturity": "NOT_DEFINED", "confidentialityRequirement": "NOT_DEFINED", "integrityRequirement": "NOT_DEFINED", "availabilityRequirement": "NOT_DEFINED", "modifiedAttackVector": "NOT_DEFINED", "modifiedAttackComplexity": "NOT_DEFINED", "modifiedAttackRequirements": "NOT_DEFINED", "modifiedPrivilegesRequired": "NOT_DEFINED", "modifiedUserInteraction": "NOT_DEFINED", "modifiedVulnConfidentialityImpact": "NOT_DEFINED", "modifiedVulnIntegrityImpact": "NOT_DEFINED", "modifiedVulnAvailabilityImpact": "NOT_DEFINED", "modifiedSubConfidentialityImpact": "NOT_DEFINED", "modifiedSubIntegrityImpact": "NOT_DEFINED", "modifiedSubAvailabilityImpact": "NOT_DEFINED", "Safety": "NOT_DEFINED", "Automatable": "NOT_DEFINED", "Recovery": "NOT_DEFINED", "valueDensity": "NOT_DEFINED", "vulnerabilityResponseEffort": "NOT_DEFINED", "providerUrgency": "NOT_DEFINED"}}], "cvssMetricV31": [{"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H", "baseScore": 8.4, "baseSeverity": "HIGH", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 2.5, "impactScore": 5.9}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-190"}]}], "references": [{"url": "https://github.com/barebox/barebox", "source": "[email protected]"}, {"url": "https://github.com/barebox/barebox/releases/tag/v2026.04.0", "source": "[email protected]"}, {"url": "https://www.vulncheck.com/advisories/barebox-efi-pe-loader-memory-safety-vulnerabilities", "source": "[email protected]"}]}}