News for hackers. Stuff that matters.
Re:You Don't Know GIF – An analysis of a GIF file and some w... by Hitton on Thursday March 10, 2022 @08:11AM (#30626502)
>Now the first line ends like this which is still a perfectly valid gif. How might that look?

>Amazing! Stupendous! Wonderful! As of the time of this writing, it’s just a perfectly black square. And this is the case in every single renderer I’ve tried. Gimp, Chrome, Firefox, Preview, gifiddle, you name it.

Funnily enough in my browser (Firefox on Ubuntu) it's transparent, but it's level of transparency I have never seen before - I can see the window below.

Re:You Don't Know GIF – An analysis of a GIF file and some w... by OscarCunningham on Thursday March 10, 2022 @10:56AM (#30628338)
Re:You Don't Know GIF – An analysis of a GIF file and some w... by nomel on Thursday March 10, 2022 @12:47PM (#30629927)
Wow, with the line of code found in under an hour.

Mozregression looks amazing: https://mozilla.github.io/mozregression/

Re:You Don't Know GIF – An analysis of a GIF file and some w... by OscarCunningham on Saturday March 19, 2022 @03:31AM (#30731916)
It's now 8 days later, and it's fixed in the nightly build. Although in contrast to what it says in the blog post, it's a perfectly white square.
Re:You Don't Know GIF – An analysis of a GIF file and some w... by anon_cow1111 on Thursday March 10, 2022 @03:31PM (#30632043)
This feels like the equivalent of patching the ai in GTA cars, so they can no longer randomly crash into each other and cause huge pileups. If no one can turn it into a working exploit, it should be left alone for the sheer weird/cool factor.
Re:You Don't Know GIF – An analysis of a GIF file and some w... by OscarCunningham on Thursday March 10, 2022 @04:23PM (#30632650)
I agree, but it does feel like it has a lot of exploit potential.
Re:You Don't Know GIF – An analysis of a GIF file and some w... by kevincox on Thursday March 10, 2022 @10:19AM (#30627857)
If Firefox is maximized I just see other text on the page as I scroll. If I make it a floating window I sometimes see other page content and sometimes see the window below. Very strange.

I wonder if this could be used for some sort of phishing attack by tricking the user into thinking it is some OS trusted dialog or just showing that you know something secret so you should be trusted (would be hard to set up to work with any sort of probability though).

Re:You Don't Know GIF – An analysis of a GIF file and some w... by sodimel on Thursday March 10, 2022 @11:35AM (#30628829)
I took a screenshot[0] using the firefox utility and the result is a black rectangle.

It's even funnier when I open the dev tools, the transparent image is replaced by a violet rectangle, blinks a few times then stay violet[1]!

[0]: https://up.l3m.in/file/1646929301.png [1]: https://up.l3m.in/file/1646929762-a.webm

Re:You Don't Know GIF – An analysis of a GIF file and some w... by earthbee on Thursday March 10, 2022 @09:23AM (#30627189)
Same for me, I can see my wallpaper and desktop icons. Very strange. Wonder if this is a risk for being exploited somehow to take photos of people's desktops
Re:You Don't Know GIF – An analysis of a GIF file and some w... by ta_2325r9e on Thursday March 10, 2022 @01:26PM (#30630489)
I wrote a simple HTML and JS to test if that's possible: Load this GIF, then draw it into a canvas using drawImage[1], then read the canvas content with getImageData. Luckily it returns an array of zeros, so it at least not trivially exploitable.

[1] https://developer.mozilla.org/en-US/docs/Web/API/CanvasRende... [2] https://developer.mozilla.org/en-US/docs/Web/API/CanvasRende...

Re:You Don't Know GIF – An analysis of a GIF file and some w... by Arnavion on Thursday March 10, 2022 @08:25PM (#30635040)
The browser is rendering that region of its window as transparent, and the display compositor is obliging by showing the layers below the browser window. The browser window itself doesn't know anything about the pixels of the layers below it. So anything that looks at the browser window, like canvas.getImageData will not return those pixels.

However screen-sharing API like getDisplayMedia() will screencopy at the compositor level, so they will include those pixels depending on what you choose to share.

Re:You Don't Know GIF – An analysis of a GIF file and some w... by OscarDC on Thursday March 10, 2022 @08:16AM (#30626541)
Same here on Arch with Firefox (perhaps due to the fact that I'm using a Wayland compositor?). It was quite surprising!
Re:You Don't Know GIF – An analysis of a GIF file and some w... by Aardwolf on Thursday March 10, 2022 @09:19AM (#30627148)
I see the desktop background through it on Archlinux with Firefox, using X with cinnamon. Even if there's another window behind, it shows the desktop background wallpaper
Re:You Don't Know GIF – An analysis of a GIF file and some w... by ogurechny on Thursday March 10, 2022 @08:53AM (#30626884)
I suppose that the graphical library simply copies the raw values to output pixels without interpreting them (as it should). In true 256 color mode (on old systems, before the effective deprecation of all the color conversion and matching routines) that would probably use the current palette. In the early 90s, if you had a lot of GIFs sharing the same palette, and knew that the program displaying them had already set it once, you could skip implementing all the palette handling.
Re:You Don't Know GIF – An analysis of a GIF file and some w... by leokennis on Thursday March 10, 2022 @10:30AM (#30627982)
Haha - it punctured your Firefox window!
Re:You Don't Know GIF – An analysis of a GIF file and some w... by amlib on Thursday March 10, 2022 @08:37AM (#30626719)
Here (Firefox on Manjaro X11) I get a HOM effect inside the square while scrolling and with whatever window was previously on top of the square. Sometimes it also renders a little bit of what was behind the window too.. very curious indeed.
Re:You Don't Know GIF – An analysis of a GIF file and some w... by chungy on Thursday March 10, 2022 @01:48PM (#30630785)
Same here with Firefox on GNOME on Arch.

I do have amusement when the author says it's a black square on every renderer he's tried, but we trivially trigger something else :)

Seems like he's on Mac OS X and so I guess it's down to platform quirks.

Re:You Don't Know GIF – An analysis of a GIF file and some w... by ggeorgovassilis on Thursday March 10, 2022 @08:48AM (#30626823)
Same here, FF on Ubuntu, it's like a rectangle was cut out of the browser window.
Re:You Don't Know GIF – An analysis of a GIF file and some w... by gus_massa on Thursday March 10, 2022 @08:41AM (#30626757)
Very interesting discovery. Can you share a screenshot?
Re:You Don't Know GIF – An analysis of a GIF file and some w... by Hitton on Thursday March 10, 2022 @08:53AM (#30626887)
It's nothing special. Relevant part: https://snipboard.io/Izntmp.jpg
Re:You Don't Know GIF – An analysis of a GIF file and some w... by OscarCunningham on Thursday March 10, 2022 @09:54AM (#30627573)
Maybe this screenshot is clearer since it shows the full desktop (Debian, KDE, X): https://i.imgur.com/Aqy3Twm.png.
Re:You Don't Know GIF – An analysis of a GIF file and some w... by Pxtl on Thursday March 10, 2022 @10:12AM (#30627771)
Okay this had me giggling like an idiot. That's a hell of a bug.
Re:You Don't Know GIF – An analysis of a GIF file and some w... by d33 on Thursday March 10, 2022 @10:49AM (#30628228)
Curious if it's exploitable.
Re:You Don't Know GIF – An analysis of a GIF file and some w... by Pxtl on Thursday March 10, 2022 @11:12AM (#30628533)
I think JS can only read pixels from the screen within a Canvas, which likely would just return the canvas colors not the background. Maybe there's some complicated ninja social engineering you could do using this, but I doubt it.