Hello, a heap-buffer-overflow reported by ASAN when I fuzz Pillow with google/atheris.
Environment
- Pillow version: 7.1.2
- Python version: Python 3.8.10
- OS version: Ubuntu 20.04.6 LTS
Output
fuzz driver:
import atheris
import io
import sys
with atheris.instrument_imports():
from PIL import Image
def fuzz_image(data):
try:
# Attempt to open the image from the fuzzed data
image = Image.open(io.BytesIO(data))
image.load() # Trigger image processing
except Exception as e:
# Handle exceptions (e.g., print or log)
pass
def main():
atheris.Setup(sys.argv, fuzz_image)
atheris.Fuzz()
if __name__ == "__main__":
main()
error log:
error.log
trigger input:
trigger.txt
Steps to Reproduce
Pull the docker image and run it to a container.
docker pull vueko0/pillow_crash:v1
docker run --rm vueko0/pillow_crash:v1
Enter the container and run following commands:
Hello, a heap-buffer-overflow reported by ASAN when I fuzz Pillow with google/atheris.
Environment
Output
fuzz driver:
error log:
error.log
trigger input:
trigger.txt
Steps to Reproduce
Pull the docker image and run it to a container.
Enter the container and run following commands: