Even should you’ve by no means used one, you in all probability know what a VCR is (or was).
Brief for video cassette recorder, it was how we recorded and watched again movies at residence within the days when digital video saved on exhausting disks was the absurdly costly privilege of big corporations, sometimes TV stations.
The cassettes have been small plastic containers that held two reels and an extended strip of magnetic recording tape – sort of like an old-school exhausting disk, however with the magnetic floor organized in an extended strip of…
…effectively, of plastic tape, 12.7mm large (that’s 1/2″ precisely) and about 100m lengthy for each hour of recording.
(Tapes have been bought with identifiers resembling E-120, that means PAL or SECAM recording, as utilized in many of the world, 120 minutes lengthy, or T-180, for 3 hours of NTSC-format recording, the TV commonplace utilized in North America and Japan).

Picture because of Toby Hudson on Wikimedia beneath CC BY-SA 2.5 AU.
Leftover information revealed on the finish
Few TV reveals have been precisely the size of a tape, so while you recorded a present, you’d often have a minimum of a little bit of tape left on the finish of the reel, which might be clean.
If you watched again, say, a 45-minute present recorded on an E-60 tape, you’d get quarter-hour of video fuzz (generally generally known as “static”) should you left the tape working when the present had completed, till the VCR detected the tip of the reel and obligingly rewound the cassette for subsequent time.
Until, in fact, you (or the buddy who’d lent you the tape) had used it earlier than, and recorded one thing longer than 45 minutes…
…by which case you’d find yourself watching the final a part of no matter was left over from the time earlier than, and when that ended, what was recorded the time earlier than that, or the time earlier than that, and so forth.
You get the image.
The cut-over was by no means very clear, as a result of the VCR would sometimes lose observe of the video sign when the primary recording ended, and play again a mish-mash of slanting traces, partial frames that jumped round on the display, blurry washes of color, and a bizarre, garbled combine of various audio soundtracks.
For some time, anyway.
Sometimes, nonetheless, the VCR would “realign” itself with the leftover information from the earlier recording, resynchronise with the outdated video stream, and the messed-up, unintelligible nonsense on the display would vanish.
You’d be solid into the tail-end of an unknown TV present, watching a trip recording, or viewing another form of residence video, most (however not all!) of which had been misplaced when it was recorded over.
In reality, until you erased the whole tape first, earlier than recording over it, you’d nearly at all times depart some sudden, and maybe undesirable, earlier content material on the finish.
The “aCropalypse” bug
Nicely, a UK cybersecurity researcher referred to as David Buchanan has simply revealed an article a couple of bug of this kind…
…within the picture modifying device on Google’s Pixel telephones.
The offending software program is outwardly generally known as Markup, and it allows you to take photographs or screenshots which are already in your cellphone, and crop or in any other case edit them to take away undesirable particulars earlier than sending them on to your pals or importing them to on-line companies.
For example, you may need to crop somebody out of the image to oblige their request to not have their face shared, or to dam out a username or account ID in a software program screenshot, or to obscure somebody’s home quantity in order to not give away their deal with.
As you possibly can think about, particularly while you crop an image to scale back its dimension, the ensuing picture file usually finally ends up smaller than the one you’re changing.
Markup, apparently, would take care of smaller-than-before photos by writing the brand new picture over the outdated one (like your Dad or your Grandfather recording this week’s soccer match over the sport on final week’s VCR tape), after which truncating the picture file to its new, shorter dimension.
The outdated information – the tail-end of final week’s soccer sport, in our VCR analogy – would stay behind on the storage system, however it will now not be a part of the digital file containing the brand new picture.
In different phrases, while you opened the brand new file, you wouldn’t have the VCR downside of leftover picture content material being included in it, as a result of the working system knew to cease studying (or copying) the file on the proper level.
The leftover information due to this fact couldn’t by chance be leaked should you despatched the brand new file to another person, or uploaded it to a cloud service.
An attacker would sometimes want bodily entry to your cellphone, have to know find out how to unlock it and get root privileges, and be capable to do a low-level forensic picture of the unused information to recuperate any previously-deleted stuff.
Apart from the bug.
To truncate or to not truncate?
As Buchanan found, the Java programming perform that Markup used to “open the prevailing file in truncate mode” (that means that unused information left over after you’d completed rewriting it will be chopped off from the tip of the file)…
…was modified, apparently about two years in the past, to “open in rewrite mode with no truncation when completed”.
In different phrases, should you opened the outdated file and wrote only one solitary byte at the beginning earlier than closing it, the brand new file wouldn’t be one byte lengthy with the remainder chopped off, as you may count on, however could be the outdated file, in its entirety, with solely the primary byte modified.
The remainder could be intact – in no way what was supposed!
As Buchanan discovered, regardless that the leftover information from the earlier model of the picture was incomplete, and could be left alone if the file have been opened with a daily picture viewer (which might learn as a lot because it wanted and ignore the additional stuff on the finish)…
…you might however extract that leftover picture information and sometimes make some sense out of it, regardless that you may find yourself with a stream of compressed information that began part-way by a compressed block.
Like these VCR tapes, the place the VCR participant may not be capable to synch with the leftover recording instantly, a specially-written PNG file decompressing program may not be capable to make sense of the primary few chunks of the leftover information, however might usually reconstruct blocks of the earlier picture that adopted afterward.
Like these VCR tapes, the place the leftover half may not be price a lot all by itself, you might by no means be fairly certain what had been left behind, and anybody digging into your information may typically get fortunate with the chunks they managed to reconstruct.
Which means they may uncover picture fragments from the tip of the earlier model that have been precisely what you had supposed to take away.
Loosely talking, the extra you’d cropped and shrunk the unique file, the extra leftover information would stay behind, and the larger the prospect that a few of it was simply what you didn’t need to share.
What to do?
- Patch now. Google has apparently patched the Markup program within the March 2023 safety replace of Android. You possibly can observe this bug-fix with the identifier CVE-2023-20136.
- Revisit photos you’ve already shared. Photographs you’ve cropped and shared already are too late to repair. However you might need to contemplate eradicating them anyway, or changing them with re-edited photos created with the patched model of Markup.
- Contemplate modifying security-critical photos conservatively in your laptop computer. File codecs resembling PNG can even embrace feedback and so-called metadata (e.g. location data or digicam particulars) that you simply by no means supposed to share, not to mention inadvertently retaining leftover pixels from earlier than.
Command-line picture manipulation instruments resembling ImageMagick or GraphicsMagick, and open-source instruments resembling GNU Image Manipulation Program, can help you convert edited photos into codecs the place you management the content material exactly.
For instance, uncooked RGB information embrace solely the color values of every pixel within the picture, with no headers, metadata, remark fields. or different extraneous data or pixels.
RGB information may be enormous, as a result of there’s no compression to save lots of house, however which means you don’t lose any picture high quality within the conversion, regardless that you do lose any and all information that isn’t immediately a part of the picture you’re involved in.
So, transcoding a picture into RGB format after which again, say, to PNG, is a technique of making certain that you simply create a completely new file that “is aware of” nothing about the place or how the unique picture was created, or what now-deleted information it would beforehand have contained.