Beginner memory question.

H. S. Teoh hsteoh at quickfur.ath.cx
Tue Apr 19 17:13:37 UTC 2022


On Tue, Apr 19, 2022 at 05:01:15PM +0000, Era Scarecrow via Digitalmars-d-learn wrote:
[...]
> In linux using zram i've allocated and made a compressed drive of 8Gb
> which took only 200k of space [...] All unallocated pages are assumed
> null/zero filled, and if you zeroize a block it will unallocate the
> space. Makes extracting memory bomb archives (*Terabytes of zeroized
> files to fill space*) becomes rather safe in that environment.
[...]

Don't be too confident about the safety of extracting memory bomb
archives. All the attacker has to do is to make an archive of gigantic
files containing 1's instead... The repeated bytes will make it compress
with very high ratio (likely the same ratio as zeroes), but when
extracting, the kernel will not be able to optimize away pages filled
with 1's.


T

-- 
Skill without imagination is craftsmanship and gives us many useful objects such as wickerwork picnic baskets.  Imagination without skill gives us modern art. -- Tom Stoppard


More information about the Digitalmars-d-learn mailing list