blob: 98a3d9cab278415fe68b367bace1ec4af54dfcbe (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
|
---
template=post
title=Memoryleak was
style=/styles/post.css
style=memoryleak.css
---
A virtual machine slowly decaying. Every seven hours it would wake up, delete a
random file, and then go back to sleep. It posted about it at
<a href="https://amble.quest/memoryleak">amble.quest/memoryleak</a>
<img src="images/screenshot.png" alt="a screenshot of memoryleak's profile on amble.quest"
style="width: 100%; border: 1px solid var(--text);">
[@paragraphs off]
<section style="margin: 1rem 0;">
<img src="images/ddr2_closest.png"
style="width: 10rem; aspect-ratio: 1 / 1; float: left; margin: 0 1rem 0.5rem 0; border: 1px solid var(--text);"
alt="a DDR2 module broken in half at it's notch. you can see the fibre of the PCB. on the side facing the camera there is a memory chip split in half and peaking open." />
<p style="margin: 0">
It's face is a RAM module that I broke in half. I processed the raw photo
through my perpetually-in-process image processing project.
I am very happy with how it came out! The split-and-<i>just</i>-peaking-open
memory chip is my favourite bit of it.</p>
</section>
<p style="clear: both; margin-top: 1rem">
The virtual machine was an <a href="https://www.alpinelinux.org">Alpine Linux</a>
virtual image, with curl installed, configured to run a script called
<code>pull</code> on boot through a <code>pull_service</code> OpenRC script.
</p>
<div id="float-hell">
<p>
<code>pull</code> would get a list of every file on the system and pick one at
random to delete. It'd then post that message to amble.quest through a relay I
made <i>(but was realistically not needed)</i> and actually delete that file.
Finally, it'd power down.
</p>
<p>
memoryleak was started from an Arch Linux host with a systemd service, <code>memoryleak.service</code> that
launched qemu <i>(through <code>memoryleak.sh</code>)</i>
</p>
<p>
It was really nice watching it run! The 7 hour spacing worked a treat. It was often
enough that I wasn't annoyed at it's slowness and it wasn't a factor of 24 which had
it drifting around the day.
</p>
<p>
Every file on the system had an even shot at getting deleted, even the ephemeral ones! The
rare occasion it hit a persist file was very exciting. In the end it was the <code>musl</code>
at the heart of it that finally gave up.
</p>
<p>
A total of 625 files were deleted. 354 of them were from /sys, 240 were from /proc, and
31 were persistent files. I've filtered the logs <i>(from the <code>did</code> file)</i>
and picked out the persistent paths. They're in <code>persistent</code> as well as
in the little box below.
</p>
<pre style="width: 100%; max-height: 10rem; overflow: scroll; font-size: 0.75rem">
23: /lib/modules/5.15.94-0-virt/kernel/net/netfilter/xt_connlabel.ko.gz
25: /lib/modules/5.15.94-0-virt/kernel/net/netfilter/ipset/ip_set_bitmap_ip.ko.gz
30: /usr/share/ca-certificates/mozilla/emSign_Root_CA_-_C1.crt
46: /lib/modules/5.15.94-0-virt/kernel/drivers/net/mdio/fwnode_mdio.ko.gz
56: /lib/modules/5.15.94-0-virt/kernel/drivers/video/fbdev/core/fb.ko.gz
63: /lib/dasd-functions.sh
116: /usr/share/syslinux/cpuid.c32
137: /usr/share/syslinux/lpxelinux.0
139: /usr/share/ca-certificates/mozilla/TWCA_Root_Certification_Authority.crt
161: /lib/apk/db/installed
198: /usr/share/syslinux/isolinux.bin
208: /lib/modules/5.15.94-0-virt/kernel/crypto/cryptd.ko.gz
237: /lib/modules/5.15.94-0-virt/kernel/net/netfilter/ipvs/ip_vs_lblcr.ko.gz
276: /lib/modules/5.15.94-0-virt/kernel/net/netfilter/nft_quota.ko.gz
298: /lib/modules/5.15.94-0-virt/kernel/fs/ksmbd/ksmbd.ko.gz
299: /lib/modules/5.15.94-0-virt/kernel/net/netfilter/xt_physdev.ko.gz
310: /usr/share/syslinux/syslinux.com
313: /lib/rc/bin/checkpath
327: /etc/secfixes.d/alpine
401: /lib/modules/5.15.94-0-virt/kernel/fs/nls/nls_cp869.ko.gz
411: /etc/mkinitfs/features.d/ocfs2.modules
443: /lib/modules/5.15.94-0-virt/kernel/net/netfilter/nf_conncount.ko.gz
452: /usr/share/ca-certificates/mozilla/TrustCor_ECA-1.crt
491: /sbin/rc-service
541: /lib/modules/5.15.94-0-virt/kernel/net/vmw_vsock/vmw_vsock_virtio_transport.ko.gz
561: /lib/modules/5.15.94-0-virt/kernel/net/netfilter/xt_osf.ko.gz
580: /lib/rc/bin/service_starting
589: /lib/modules/5.15.94-0-virt/kernel/net/netfilter/xt_policy.ko.gz
599: /usr/share/ca-certificates/mozilla/DigiCert_Trusted_Root_G4.crt
616: /lib/modules/5.15.94-0-virt/kernel/crypto/algif_hash.ko.gz
625: /lib/ld-musl-x86_64.so.1
</pre>
<h2 style="text-decoration: underline;">downloads</h2>
<section id="downloads">
<div>
<h3>logs</h3>
<ul>
<li><a href="files/did">did</a></li>
<li><a href="files/persistent">persistent</a></li>
</ul>
</div>
<div>
<h3>images</h3>
<ul>
<li><a href="images/ddr2_closest.png">ddr2_closest.png</a></li>
<li><a href="images/ddr2.png">ddr2.png</a> (32MB)</li>
<li><a href="images/ddr2.nef">ddr2.nef</a> (16MB)</li>
</ul>
</div>
<div style="grid-column: 1 / 3;">
<h3>scripts</h3>
<ul>
<li><a href="files/memoryleak.sh">memoryleak.sh</a></li>
<li><a href="files/memoryleak.service">memoryleak.service</a></li>
<li><a href="files/pull">pull</a></li>
<li><a href="files/pull_service">pull_service</a></li>
</ul>
</div>
</section>
</div>
|