You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Integer Overflow in ImagingResampleHorizontal #1710
xsize is trusted user input. These multiplications can overflow, leading the malloc'd buffer to be undersized. These allocations are followed by a loop that writes out of bounds. This can lead to corruption on the heap of the Python process with attacker controlled data (exploiting this would be really cool, as the loop contains some serious floaty arithmetic). It's possible someone has an image resizing service using Pillow. :)
See the following proof of concept:
from PIL import Image
im = Image.open("cat.jpg").convert("L")
xsize = 0x100000008 / 4
ysize = 0x1337 # unrelated
im.im.resize((xsize, ysize), Image.LINEAR) # any resampling filter will do here
where "cat.jpg" is your favorite valid cat picture.
Oh, I just noticed in #1708 there's a mention of a private repo for security updates and some CVEs. I hope you don't mind that I disclosed this bug here. If I find related bugs in the future, should I contact the maintainers through some other channel?
Ok, in the future I'll contact him there. I've contributed security fixes to some projects before but hadn't encountered a security procedure like this. (For example, the CPython project itself just accepts public disclosures in their normal bug tracker.)
Activity
radarhere commentedon Feb 4, 2016
Sounds to me like you have a fairly good handle on the situation. Would you be interested in creating a PR to solve the problem?
nedwill commentedon Feb 4, 2016
Sure, I'll take a look.
nedwill commentedon Feb 4, 2016
Oh, I just noticed in #1708 there's a mention of a private repo for security updates and some CVEs. I hope you don't mind that I disclosed this bug here. If I find related bugs in the future, should I contact the maintainers through some other channel?
radarhere commentedon Feb 4, 2016
The current conclusion of #1658 is to e-mail [email protected] and let him know.
nedwill commentedon Feb 4, 2016
Ok, in the future I'll contact him there. I've contributed security fixes to some projects before but hadn't encountered a security procedure like this. (For example, the CPython project itself just accepts public disclosures in their normal bug tracker.)
graphics/py-pillow: Backport security fixes
graphics/py-pillow: Backport security fixes
MFH: r408782 graphics/py-pillow: Backport security fixes
graphics/py-pillow: Backport security fixes
MFH: r408782 graphics/py-pillow: Backport security fixes
MFH: r408782 graphics/py-pillow: Backport security fixes