-
Notifications
You must be signed in to change notification settings - Fork 17.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
x/image/tiff: excessive memory consumption #11389
Comments
Another similar case is when IFD offset is large, so Commit: 63626fb251ce5d89650d28bc5d6ccd7d63a70fef |
This effectively CVE-2022-41727 ignored for 8 years... the magic of CVEs... |
@dvyukov this CVE was in tiff.DecodeConfig not Decode as in your stack trace... (Decode can allocate arbitrary amounts of memory, especially png which use u32 for dimensions.) |
Humm... this reproducer is also fixed by the commit. "This makes DecodeConfig safe to use to determine if the image is of a reasonable size to call Decode on" |
Indeed. I guess the last replacement of ReadAt fixes your case and the first one fixed my case |
The following program:
when run with
ulimit -v 1000000
crashes as:That is, tiff tries to allocate 0xfa0000fa (4194304250) bytes to decode 15x16 image. That is too much.
on commit eb11b45157c1b71f30b3cec66306f1cd779a689e
go version devel +3cab476 Sun Jun 21 03:11:01 2015 +0000 linux/amd64
The text was updated successfully, but these errors were encountered: