-
Notifications
You must be signed in to change notification settings - Fork 567
Open
Description
When the requested index exceeds the available data, update() cannot add enough data to the buffer, causing the parser to crash with an IndexError. The expected behavior is to return a '\0' terminator or raise a controlled ReaderError exception.
poc
obj = yaml.loader.Loader('abc')
ret = obj.peek(4)
trace:
Traceback (most recent call last):
File "/root/anaconda3/lib/python3.9/site-packages/yaml/reader.py", line 89, in peek
return self.buffer[self.pointer+index]
IndexError: string index out of range
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/root/PyRTFuzz/check/failed/seeds_yaml5/yaml.reader.Reader.peek/1#yaml#reader#Reader#peek.py", line 33, in <module>
RunFuzzer('abc')
File "/root/PyRTFuzz/check/failed/seeds_yaml5/yaml.reader.Reader.peek/1#yaml#reader#Reader#peek.py", line 30, in RunFuzzer
output = dc.demoFunc(x)
File "/root/PyRTFuzz/check/failed/seeds_yaml5/yaml.reader.Reader.peek/1#yaml#reader#Reader#peek.py", line 24, in demoFunc
ret = obj.peek(4)
File "/root/anaconda3/lib/python3.9/site-packages/yaml/reader.py", line 92, in peek
return self.buffer[self.pointer+index]
IndexError: string index out of range
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels