nitowa пре 1 година
родитељ
комит
bd51871e95

+ 58
- 0
SemSEpaper/exercise.bib Прегледај датотеку

@@ -0,0 +1,58 @@
1
+@INPROCEEDINGS{9678888,
2
+	author={Choi, Jaeseung and Kim, Doyeon and Kim, Soomin and Grieco, Gustavo and Groce, Alex and Cha, Sang Kil},
3
+	booktitle={2021 36th IEEE/ACM International Conference on Automated Software Engineering (ASE)}, 
4
+	title={SMARTIAN: Enhancing Smart Contract Fuzzing with Static and Dynamic Data-Flow Analyses}, 
5
+	year={2021},
6
+	volume={},
7
+	number={},
8
+	pages={227-239},
9
+	doi={10.1109/ASE51524.2021.9678888}}
10
+
11
+@inproceedings{10.1145/3578527.3578538,
12
+	author = {Pani, Siddhasagar and Nallagonda, Harshita Vani and Vigneswaran and Medicherla, Raveendra Kumar and Rajan M},
13
+	title = {SmartFuzzDriverGen: Smart Contract Fuzzing Automation for Golang},
14
+	year = {2023},
15
+	isbn = {9798400700644},
16
+	publisher = {Association for Computing Machinery},
17
+	address = {New York, NY, USA},
18
+	url = {https://doi.org/10.1145/3578527.3578538},
19
+	doi = {10.1145/3578527.3578538},
20
+	abstract = {Greybox fuzzers require intermediate programs called fuzz drivers to test smart contract APIs. These fuzz drivers use the semi-random inputs (bytes) generated by fuzzers to prepare suitable inputs required to test APIs. Further, fuzz driver also uses this input to decide sequence in which APIs to be invoked and enables the fuzzer to execute the APIs in that sequence to find the vulnerabilities, if any. Manually writing such complex and intelligent fuzz drivers is laborious, requires deep technical skills, hence can be cumbersome and error prone. In this paper, we propose SmartFuzzDriverGen framework to automatically generate fuzz drivers which invoke smart contract APIs using different strategies: unit-level, sequence-based (random, user-defined), and heuristics based. We evaluate the proposed framework by testing a prototype implementation of it with Golang smart contracts (targeted for Hyperledger Fabric platform) and study the effectiveness of the generated fuzz drivers in terms of code coverage as well as bug finding abilities. We observed that fuzzing of APIs in random sequences performed better than the other methods.},
21
+	booktitle = {Proceedings of the 16th Innovations in Software Engineering Conference},
22
+	articleno = {14},
23
+	numpages = {11},
24
+	keywords = {smart contracts, vulnerability detection, automated driver generation, blockchain, fuzzing, sequencing},
25
+	location = {Allahabad, India},
26
+	series = {ISEC '23}
27
+}
28
+
29
+@inproceedings {217464,
30
+	author = {Johannes Krupp and Christian Rossow},
31
+	title = {{teEther}: Gnawing at Ethereum to Automatically Exploit Smart Contracts},
32
+	booktitle = {27th USENIX Security Symposium (USENIX Security 18)},
33
+	year = {2018},
34
+	isbn = {978-1-939133-04-5},
35
+	address = {Baltimore, MD},
36
+	pages = {1317--1333},
37
+	url = {https://www.usenix.org/conference/usenixsecurity18/presentation/krupp},
38
+	publisher = {USENIX Association},
39
+	month = aug
40
+}
41
+
42
+@inproceedings{10.1145/3243734.3243780,
43
+	author = {Tsankov, Petar and Dan, Andrei and Drachsler-Cohen, Dana and Gervais, Arthur and B\"{u}nzli, Florian and Vechev, Martin},
44
+	title = {Securify: Practical Security Analysis of Smart Contracts},
45
+	year = {2018},
46
+	isbn = {9781450356930},
47
+	publisher = {Association for Computing Machinery},
48
+	address = {New York, NY, USA},
49
+	url = {https://doi.org/10.1145/3243734.3243780},
50
+	doi = {10.1145/3243734.3243780},
51
+	abstract = {Permissionless blockchains allow the execution of arbitrary programs (called smart contracts), enabling mutually untrusted entities to interact without relying on trusted third parties. Despite their potential, repeated security concerns have shaken the trust in handling billions of USD by smart contracts. To address this problem, we present Securify, a security analyzer for Ethereum smart contracts that is scalable, fully automated, and able to prove contract behaviors as safe/unsafe with respect to a given property. Securify's analysis consists of two steps. First, it symbolically analyzes the contract's dependency graph to extract precise semantic information from the code. Then, it checks compliance and violation patterns that capture sufficient conditions for proving if a property holds or not. To enable extensibility, all patterns are specified in a designated domain-specific language. Securify is publicly released, it has analyzed >18K contracts submitted by its users, and is regularly used to conduct security audits by experts. We present an extensive evaluation of Securify over real-world Ethereum smart contracts and demonstrate that it can effectively prove the correctness of smart contracts and discover critical violations.},
52
+	booktitle = {Proceedings of the 2018 ACM SIGSAC Conference on Computer and Communications Security},
53
+	pages = {67–82},
54
+	numpages = {16},
55
+	keywords = {smart contracts, stratified datalog, verification, security analysis},
56
+	location = {Toronto, Canada},
57
+	series = {CCS '18}
58
+}

+ 21
- 0
SemSEpaper/exercises.aux Прегледај датотеку

@@ -0,0 +1,21 @@
1
+\relax 
2
+\bibstyle{plain}
3
+\providecommand \oddpage@label [2]{}
4
+\@writefile{toc}{\contentsline {section}{\numberline {1}Weakness and consequences}{1}{}\protected@file@percent }
5
+\@writefile{toc}{\contentsline {subsection}{\numberline {1.1}Solidity storage layout}{1}{}\protected@file@percent }
6
+\@writefile{toc}{\contentsline {subsection}{\numberline {1.2}The Weakness}{1}{}\protected@file@percent }
7
+\@writefile{loa}{\contentsline {algocf}{\numberline {1}{\ignorespaces A completely unchecked array write}}{1}{}\protected@file@percent }
8
+\newlabel{alg:agf-opt-merge}{{1}{1}}
9
+\citation{10.1145/3243734.3243780}
10
+\citation{10.1145/3578527.3578538}
11
+\citation{217464}
12
+\citation{9678888}
13
+\bibdata{exercise.bib}
14
+\bibcite{9678888}{1}
15
+\bibcite{217464}{2}
16
+\bibcite{10.1145/3578527.3578538}{3}
17
+\bibcite{10.1145/3243734.3243780}{4}
18
+\@writefile{toc}{\contentsline {section}{\numberline {2}Vulnerable contracts in literature}{2}{}\protected@file@percent }
19
+\@writefile{toc}{\contentsline {section}{\numberline {3}Code properties and automatic detection}{2}{}\protected@file@percent }
20
+\@writefile{toc}{\contentsline {section}{\numberline {4}Exploit sketch}{2}{}\protected@file@percent }
21
+\gdef \@abspage@last{2}

+ 34
- 0
SemSEpaper/exercises.bbl Прегледај датотеку

@@ -0,0 +1,34 @@
1
+\begin{thebibliography}{1}
2
+
3
+\bibitem{9678888}
4
+Jaeseung Choi, Doyeon Kim, Soomin Kim, Gustavo Grieco, Alex Groce, and Sang~Kil
5
+  Cha.
6
+\newblock Smartian: Enhancing smart contract fuzzing with static and dynamic
7
+  data-flow analyses.
8
+\newblock In {\em 2021 36th IEEE/ACM International Conference on Automated
9
+  Software Engineering (ASE)}, pages 227--239, 2021.
10
+
11
+\bibitem{217464}
12
+Johannes Krupp and Christian Rossow.
13
+\newblock {teEther}: Gnawing at ethereum to automatically exploit smart
14
+  contracts.
15
+\newblock In {\em 27th USENIX Security Symposium (USENIX Security 18)}, pages
16
+  1317--1333, Baltimore, MD, August 2018. USENIX Association.
17
+
18
+\bibitem{10.1145/3578527.3578538}
19
+Siddhasagar Pani, Harshita~Vani Nallagonda, Vigneswaran, Raveendra~Kumar
20
+  Medicherla, and Rajan M.
21
+\newblock Smartfuzzdrivergen: Smart contract fuzzing automation for golang.
22
+\newblock In {\em Proceedings of the 16th Innovations in Software Engineering
23
+  Conference}, ISEC '23, New York, NY, USA, 2023. Association for Computing
24
+  Machinery.
25
+
26
+\bibitem{10.1145/3243734.3243780}
27
+Petar Tsankov, Andrei Dan, Dana Drachsler-Cohen, Arthur Gervais, Florian
28
+  B\"{u}nzli, and Martin Vechev.
29
+\newblock Securify: Practical security analysis of smart contracts.
30
+\newblock In {\em Proceedings of the 2018 ACM SIGSAC Conference on Computer and
31
+  Communications Security}, CCS '18, page 67–82, New York, NY, USA, 2018.
32
+  Association for Computing Machinery.
33
+
34
+\end{thebibliography}

+ 48
- 0
SemSEpaper/exercises.blg Прегледај датотеку

@@ -0,0 +1,48 @@
1
+This is BibTeX, Version 0.99d
2
+Capacity: max_strings=200000, hash_size=200000, hash_prime=170003
3
+The top-level auxiliary file: exercises.aux
4
+Reallocating 'name_of_file' (item size: 1) to 6 items.
5
+The style file: plain.bst
6
+Reallocating 'name_of_file' (item size: 1) to 13 items.
7
+Database file #1: exercise.bib
8
+You've used 4 entries,
9
+            2118 wiz_defined-function locations,
10
+            525 strings with 5122 characters,
11
+and the built_in function-call counts, 2044 in all, are:
12
+= -- 206
13
+> -- 107
14
+< -- 3
15
++ -- 42
16
+- -- 38
17
+* -- 137
18
+:= -- 313
19
+add.period$ -- 15
20
+call.type$ -- 4
21
+change.case$ -- 31
22
+chr.to.int$ -- 0
23
+cite$ -- 4
24
+duplicate$ -- 91
25
+empty$ -- 144
26
+format.name$ -- 38
27
+if$ -- 458
28
+int.to.chr$ -- 0
29
+int.to.str$ -- 4
30
+missing$ -- 4
31
+newline$ -- 23
32
+num.names$ -- 8
33
+pop$ -- 38
34
+preamble$ -- 1
35
+purify$ -- 27
36
+quote$ -- 0
37
+skip$ -- 75
38
+stack$ -- 0
39
+substring$ -- 102
40
+swap$ -- 40
41
+text.length$ -- 3
42
+text.prefix$ -- 0
43
+top$ -- 0
44
+type$ -- 16
45
+warning$ -- 0
46
+while$ -- 14
47
+width$ -- 5
48
+write$ -- 53

+ 624
- 0
SemSEpaper/exercises.log Прегледај датотеку

@@ -0,0 +1,624 @@
1
+This is pdfTeX, Version 3.141592653-2.6-1.40.25 (MiKTeX 23.5) (preloaded format=pdflatex 2023.6.4)  23 OCT 2023 19:58
2
+entering extended mode
3
+ restricted \write18 enabled.
4
+ %&-line parsing enabled.
5
+**./exercises.tex
6
+(exercises.tex
7
+LaTeX2e <2022-11-01> patch level 1
8
+L3 programming layer <2023-05-15>
9
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/latex/base\article.cls
10
+Document Class: article 2022/07/02 v1.4n Standard LaTeX document class
11
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/latex/base\size10.clo
12
+File: size10.clo 2022/07/02 v1.4n Standard LaTeX file (size option)
13
+)
14
+\c@part=\count185
15
+\c@section=\count186
16
+\c@subsection=\count187
17
+\c@subsubsection=\count188
18
+\c@paragraph=\count189
19
+\c@subparagraph=\count190
20
+\c@figure=\count191
21
+\c@table=\count192
22
+\abovecaptionskip=\skip48
23
+\belowcaptionskip=\skip49
24
+\bibindent=\dimen140
25
+)
26
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/latex/base\latexsym.sty
27
+Package: latexsym 1998/08/17 v2.2e Standard LaTeX package (lasy symbols)
28
+\symlasy=\mathgroup4
29
+LaTeX Font Info:    Overwriting symbol font `lasy' in version `bold'
30
+(Font)                  U/lasy/m/n --> U/lasy/b/n on input line 52.
31
+)
32
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/latex/amsfonts\amssymb.sty
33
+Package: amssymb 2013/01/14 v3.01 AMS font symbols
34
+
35
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/latex/amsfonts\amsfonts.sty
36
+Package: amsfonts 2013/01/14 v3.01 Basic AMSFonts support
37
+\@emptytoks=\toks16
38
+\symAMSa=\mathgroup5
39
+\symAMSb=\mathgroup6
40
+LaTeX Font Info:    Redeclaring math symbol \hbar on input line 98.
41
+LaTeX Font Info:    Overwriting math alphabet `\mathfrak' in version `bold'
42
+(Font)                  U/euf/m/n --> U/euf/b/n on input line 106.
43
+)) (d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/latex/graphics\epsfig.sty
44
+Package: epsfig 2017/06/25 v1.7b (e)psfig emulation (SPQR)
45
+
46
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/latex/graphics\graphicx.sty
47
+Package: graphicx 2021/09/16 v1.2d Enhanced LaTeX Graphics (DPC,SPQR)
48
+
49
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/latex/graphics\keyval.sty
50
+Package: keyval 2022/05/29 v1.15 key=value parser (DPC)
51
+\KV@toks@=\toks17
52
+)
53
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/latex/graphics\graphics.sty
54
+Package: graphics 2022/03/10 v1.4e Standard LaTeX Graphics (DPC,SPQR)
55
+
56
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/latex/graphics\trig.sty
57
+Package: trig 2021/08/11 v1.11 sin cos tan (DPC)
58
+)
59
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/latex/graphics-cfg\graphics.
60
+cfg
61
+File: graphics.cfg 2016/06/04 v1.11 sample graphics configuration
62
+)
63
+Package graphics Info: Driver file: pdftex.def on input line 107.
64
+
65
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/latex/graphics-def\pdftex.de
66
+f
67
+File: pdftex.def 2022/09/22 v1.2b Graphics/color driver for pdftex
68
+))
69
+\Gin@req@height=\dimen141
70
+\Gin@req@width=\dimen142
71
+)
72
+\epsfxsize=\dimen143
73
+\epsfysize=\dimen144
74
+)
75
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/latex/preprint\fullpage.sty
76
+Package: fullpage 1999/02/23 1.1 (PWD)
77
+\FP@margin=\skip50
78
+) (d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/latex/tools\enumerate.sty
79
+Package: enumerate 2015/07/23 v3.00 enumerate extensions (DPC)
80
+\@enLab=\toks18
81
+)
82
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/latex/tools\xspace.sty
83
+Package: xspace 2014/10/28 v1.13 Space after command names (DPC,MH)
84
+)
85
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/latex/todonotes\todonotes.st
86
+y
87
+Package: todonotes 2023/01/31 v1.1.6 Todonotes source and documentation.
88
+Package: todonotes 2023/01/31
89
+ (d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/latex/base\ifthen.sty
90
+Package: ifthen 2022/04/13 v1.1d Standard LaTeX ifthen package (DPC)
91
+)
92
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/latex/xkeyval\xkeyval.sty
93
+Package: xkeyval 2022/06/16 v2.9 package option processing (HA)
94
+
95
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/generic/xkeyval\xkeyval.tex
96
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/generic/xkeyval\xkvutils.tex
97
+\XKV@toks=\toks19
98
+\XKV@tempa@toks=\toks20
99
+)
100
+\XKV@depth=\count193
101
+File: xkeyval.tex 2014/12/03 v2.7a key=value parser (HA)
102
+)) (d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/latex/xcolor\xcolor.sty
103
+Package: xcolor 2022/06/12 v2.14 LaTeX color extensions (UK)
104
+
105
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/latex/graphics-cfg\color.cfg
106
+File: color.cfg 2016/01/02 v1.6 sample color configuration
107
+)
108
+Package xcolor Info: Driver file: pdftex.def on input line 227.
109
+
110
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/latex/graphics\mathcolor.ltx
111
+)
112
+Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1353.
113
+Package xcolor Info: Model `hsb' substituted by `rgb' on input line 1357.
114
+Package xcolor Info: Model `RGB' extended on input line 1369.
115
+Package xcolor Info: Model `HTML' substituted by `rgb' on input line 1371.
116
+Package xcolor Info: Model `Hsb' substituted by `hsb' on input line 1372.
117
+Package xcolor Info: Model `tHsb' substituted by `hsb' on input line 1373.
118
+Package xcolor Info: Model `HSB' substituted by `hsb' on input line 1374.
119
+Package xcolor Info: Model `Gray' substituted by `gray' on input line 1375.
120
+Package xcolor Info: Model `wave' substituted by `hsb' on input line 1376.
121
+)
122
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/latex/pgf/frontendlayer\tikz
123
+.sty
124
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/latex/pgf/basiclayer\pgf.sty
125
+
126
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/latex/pgf/utilities\pgfrcs.s
127
+ty
128
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/generic/pgf/utilities\pgfuti
129
+l-common.tex
130
+\pgfutil@everybye=\toks21
131
+\pgfutil@tempdima=\dimen145
132
+\pgfutil@tempdimb=\dimen146
133
+)
134
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/generic/pgf/utilities\pgfuti
135
+l-latex.def
136
+\pgfutil@abb=\box51
137
+)
138
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/generic/pgf/utilities\pgfrcs
139
+.code.tex
140
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/generic/pgf\pgf.revision.tex
141
+)
142
+Package: pgfrcs 2023-01-15 v3.1.10 (3.1.10)
143
+))
144
+Package: pgf 2023-01-15 v3.1.10 (3.1.10)
145
+
146
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/latex/pgf/basiclayer\pgfcore
147
+.sty
148
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/latex/pgf/systemlayer\pgfsys
149
+.sty
150
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/generic/pgf/systemlayer\pgfs
151
+ys.code.tex
152
+Package: pgfsys 2023-01-15 v3.1.10 (3.1.10)
153
+
154
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/generic/pgf/utilities\pgfkey
155
+s.code.tex
156
+\pgfkeys@pathtoks=\toks22
157
+\pgfkeys@temptoks=\toks23
158
+
159
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/generic/pgf/utilities\pgfkey
160
+slibraryfiltered.code.tex
161
+\pgfkeys@tmptoks=\toks24
162
+))
163
+\pgf@x=\dimen147
164
+\pgf@y=\dimen148
165
+\pgf@xa=\dimen149
166
+\pgf@ya=\dimen150
167
+\pgf@xb=\dimen151
168
+\pgf@yb=\dimen152
169
+\pgf@xc=\dimen153
170
+\pgf@yc=\dimen154
171
+\pgf@xd=\dimen155
172
+\pgf@yd=\dimen156
173
+\w@pgf@writea=\write3
174
+\r@pgf@reada=\read2
175
+\c@pgf@counta=\count194
176
+\c@pgf@countb=\count195
177
+\c@pgf@countc=\count196
178
+\c@pgf@countd=\count197
179
+\t@pgf@toka=\toks25
180
+\t@pgf@tokb=\toks26
181
+\t@pgf@tokc=\toks27
182
+\pgf@sys@id@count=\count198
183
+
184
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/generic/pgf/systemlayer\pgf.
185
+cfg
186
+File: pgf.cfg 2023-01-15 v3.1.10 (3.1.10)
187
+)
188
+Driver file for pgf: pgfsys-pdftex.def
189
+
190
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/generic/pgf/systemlayer\pgfs
191
+ys-pdftex.def
192
+File: pgfsys-pdftex.def 2023-01-15 v3.1.10 (3.1.10)
193
+
194
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/generic/pgf/systemlayer\pgfs
195
+ys-common-pdf.def
196
+File: pgfsys-common-pdf.def 2023-01-15 v3.1.10 (3.1.10)
197
+)))
198
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/generic/pgf/systemlayer\pgfs
199
+yssoftpath.code.tex
200
+File: pgfsyssoftpath.code.tex 2023-01-15 v3.1.10 (3.1.10)
201
+\pgfsyssoftpath@smallbuffer@items=\count199
202
+\pgfsyssoftpath@bigbuffer@items=\count266
203
+)
204
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/generic/pgf/systemlayer\pgfs
205
+ysprotocol.code.tex
206
+File: pgfsysprotocol.code.tex 2023-01-15 v3.1.10 (3.1.10)
207
+))
208
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfco
209
+re.code.tex
210
+Package: pgfcore 2023-01-15 v3.1.10 (3.1.10)
211
+
212
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmath.cod
213
+e.tex
214
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmathutil
215
+.code.tex)
216
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmathpars
217
+er.code.tex
218
+\pgfmath@dimen=\dimen157
219
+\pgfmath@count=\count267
220
+\pgfmath@box=\box52
221
+\pgfmath@toks=\toks28
222
+\pgfmath@stack@operand=\toks29
223
+\pgfmath@stack@operation=\toks30
224
+)
225
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmathfunc
226
+tions.code.tex)
227
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmathfunc
228
+tions.basic.code.tex)
229
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmathfunc
230
+tions.trigonometric.code.tex)
231
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmathfunc
232
+tions.random.code.tex)
233
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmathfunc
234
+tions.comparison.code.tex)
235
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmathfunc
236
+tions.base.code.tex)
237
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmathfunc
238
+tions.round.code.tex)
239
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmathfunc
240
+tions.misc.code.tex)
241
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmathfunc
242
+tions.integerarithmetics.code.tex)
243
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmathcalc
244
+.code.tex)
245
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmathfloa
246
+t.code.tex
247
+\c@pgfmathroundto@lastzeros=\count268
248
+))
249
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfint.code
250
+.tex)
251
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfco
252
+repoints.code.tex
253
+File: pgfcorepoints.code.tex 2023-01-15 v3.1.10 (3.1.10)
254
+\pgf@picminx=\dimen158
255
+\pgf@picmaxx=\dimen159
256
+\pgf@picminy=\dimen160
257
+\pgf@picmaxy=\dimen161
258
+\pgf@pathminx=\dimen162
259
+\pgf@pathmaxx=\dimen163
260
+\pgf@pathminy=\dimen164
261
+\pgf@pathmaxy=\dimen165
262
+\pgf@xx=\dimen166
263
+\pgf@xy=\dimen167
264
+\pgf@yx=\dimen168
265
+\pgf@yy=\dimen169
266
+\pgf@zx=\dimen170
267
+\pgf@zy=\dimen171
268
+)
269
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfco
270
+repathconstruct.code.tex
271
+File: pgfcorepathconstruct.code.tex 2023-01-15 v3.1.10 (3.1.10)
272
+\pgf@path@lastx=\dimen172
273
+\pgf@path@lasty=\dimen173
274
+)
275
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfco
276
+repathusage.code.tex
277
+File: pgfcorepathusage.code.tex 2023-01-15 v3.1.10 (3.1.10)
278
+\pgf@shorten@end@additional=\dimen174
279
+\pgf@shorten@start@additional=\dimen175
280
+)
281
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfco
282
+rescopes.code.tex
283
+File: pgfcorescopes.code.tex 2023-01-15 v3.1.10 (3.1.10)
284
+\pgfpic=\box53
285
+\pgf@hbox=\box54
286
+\pgf@layerbox@main=\box55
287
+\pgf@picture@serial@count=\count269
288
+)
289
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfco
290
+regraphicstate.code.tex
291
+File: pgfcoregraphicstate.code.tex 2023-01-15 v3.1.10 (3.1.10)
292
+\pgflinewidth=\dimen176
293
+)
294
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfco
295
+retransformations.code.tex
296
+File: pgfcoretransformations.code.tex 2023-01-15 v3.1.10 (3.1.10)
297
+\pgf@pt@x=\dimen177
298
+\pgf@pt@y=\dimen178
299
+\pgf@pt@temp=\dimen179
300
+)
301
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfco
302
+requick.code.tex
303
+File: pgfcorequick.code.tex 2023-01-15 v3.1.10 (3.1.10)
304
+)
305
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfco
306
+reobjects.code.tex
307
+File: pgfcoreobjects.code.tex 2023-01-15 v3.1.10 (3.1.10)
308
+)
309
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfco
310
+repathprocessing.code.tex
311
+File: pgfcorepathprocessing.code.tex 2023-01-15 v3.1.10 (3.1.10)
312
+)
313
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfco
314
+rearrows.code.tex
315
+File: pgfcorearrows.code.tex 2023-01-15 v3.1.10 (3.1.10)
316
+\pgfarrowsep=\dimen180
317
+)
318
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfco
319
+reshade.code.tex
320
+File: pgfcoreshade.code.tex 2023-01-15 v3.1.10 (3.1.10)
321
+\pgf@max=\dimen181
322
+\pgf@sys@shading@range@num=\count270
323
+\pgf@shadingcount=\count271
324
+)
325
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfco
326
+reimage.code.tex
327
+File: pgfcoreimage.code.tex 2023-01-15 v3.1.10 (3.1.10)
328
+)
329
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfco
330
+reexternal.code.tex
331
+File: pgfcoreexternal.code.tex 2023-01-15 v3.1.10 (3.1.10)
332
+\pgfexternal@startupbox=\box56
333
+)
334
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfco
335
+relayers.code.tex
336
+File: pgfcorelayers.code.tex 2023-01-15 v3.1.10 (3.1.10)
337
+)
338
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfco
339
+retransparency.code.tex
340
+File: pgfcoretransparency.code.tex 2023-01-15 v3.1.10 (3.1.10)
341
+)
342
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfco
343
+repatterns.code.tex
344
+File: pgfcorepatterns.code.tex 2023-01-15 v3.1.10 (3.1.10)
345
+)
346
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfco
347
+rerdf.code.tex
348
+File: pgfcorerdf.code.tex 2023-01-15 v3.1.10 (3.1.10)
349
+)))
350
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/generic/pgf/modules\pgfmodul
351
+eshapes.code.tex
352
+File: pgfmoduleshapes.code.tex 2023-01-15 v3.1.10 (3.1.10)
353
+\pgfnodeparttextbox=\box57
354
+)
355
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/generic/pgf/modules\pgfmodul
356
+eplot.code.tex
357
+File: pgfmoduleplot.code.tex 2023-01-15 v3.1.10 (3.1.10)
358
+)
359
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/latex/pgf/compatibility\pgfc
360
+omp-version-0-65.sty
361
+Package: pgfcomp-version-0-65 2023-01-15 v3.1.10 (3.1.10)
362
+\pgf@nodesepstart=\dimen182
363
+\pgf@nodesepend=\dimen183
364
+)
365
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/latex/pgf/compatibility\pgfc
366
+omp-version-1-18.sty
367
+Package: pgfcomp-version-1-18 2023-01-15 v3.1.10 (3.1.10)
368
+))
369
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/latex/pgf/utilities\pgffor.s
370
+ty
371
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/latex/pgf/utilities\pgfkeys.
372
+sty
373
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/generic/pgf/utilities\pgfkey
374
+s.code.tex))
375
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/latex/pgf/math\pgfmath.sty
376
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmath.cod
377
+e.tex))
378
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/generic/pgf/utilities\pgffor
379
+.code.tex
380
+Package: pgffor 2023-01-15 v3.1.10 (3.1.10)
381
+\pgffor@iter=\dimen184
382
+\pgffor@skip=\dimen185
383
+\pgffor@stack=\toks31
384
+\pgffor@toks=\toks32
385
+))
386
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/generic/pgf/frontendlayer/ti
387
+kz\tikz.code.tex
388
+Package: tikz 2023-01-15 v3.1.10 (3.1.10)
389
+
390
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/generic/pgf/libraries\pgflib
391
+raryplothandlers.code.tex
392
+File: pgflibraryplothandlers.code.tex 2023-01-15 v3.1.10 (3.1.10)
393
+\pgf@plot@mark@count=\count272
394
+\pgfplotmarksize=\dimen186
395
+)
396
+\tikz@lastx=\dimen187
397
+\tikz@lasty=\dimen188
398
+\tikz@lastxsaved=\dimen189
399
+\tikz@lastysaved=\dimen190
400
+\tikz@lastmovetox=\dimen191
401
+\tikz@lastmovetoy=\dimen192
402
+\tikzleveldistance=\dimen193
403
+\tikzsiblingdistance=\dimen194
404
+\tikz@figbox=\box58
405
+\tikz@figbox@bg=\box59
406
+\tikz@tempbox=\box60
407
+\tikz@tempbox@bg=\box61
408
+\tikztreelevel=\count273
409
+\tikznumberofchildren=\count274
410
+\tikznumberofcurrentchild=\count275
411
+\tikz@fig@count=\count276
412
+
413
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/generic/pgf/modules\pgfmodul
414
+ematrix.code.tex
415
+File: pgfmodulematrix.code.tex 2023-01-15 v3.1.10 (3.1.10)
416
+\pgfmatrixcurrentrow=\count277
417
+\pgfmatrixcurrentcolumn=\count278
418
+\pgf@matrix@numberofcolumns=\count279
419
+)
420
+\tikz@expandcount=\count280
421
+
422
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/generic/pgf/frontendlayer/ti
423
+kz/libraries\tikzlibrarytopaths.code.tex
424
+File: tikzlibrarytopaths.code.tex 2023-01-15 v3.1.10 (3.1.10)
425
+)))
426
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/generic/pgf/frontendlayer/ti
427
+kz/libraries\tikzlibrarypositioning.code.tex
428
+File: tikzlibrarypositioning.code.tex 2023-01-15 v3.1.10 (3.1.10)
429
+)
430
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/latex/tools\calc.sty
431
+Package: calc 2017/05/25 v4.3 Infix arithmetic (KKT,FJ)
432
+\calc@Acount=\count281
433
+\calc@Bcount=\count282
434
+\calc@Adimen=\dimen195
435
+\calc@Bdimen=\dimen196
436
+\calc@Askip=\skip51
437
+\calc@Bskip=\skip52
438
+LaTeX Info: Redefining \setlength on input line 80.
439
+LaTeX Info: Redefining \addtolength on input line 81.
440
+\calc@Ccount=\count283
441
+\calc@Cskip=\skip53
442
+)
443
+\c@@todonotes@numberoftodonotes=\count284
444
+)
445
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/latex/listings\listings.sty
446
+\lst@mode=\count285
447
+\lst@gtempboxa=\box62
448
+\lst@token=\toks33
449
+\lst@length=\count286
450
+\lst@currlwidth=\dimen197
451
+\lst@column=\count287
452
+\lst@pos=\count288
453
+\lst@lostspace=\dimen198
454
+\lst@width=\dimen199
455
+\lst@newlines=\count289
456
+\lst@lineno=\count290
457
+\lst@maxwidth=\dimen256
458
+
459
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/latex/listings\lstmisc.sty
460
+File: lstmisc.sty 2023/02/27 1.9 (Carsten Heinz)
461
+\c@lstnumber=\count291
462
+\lst@skipnumbers=\count292
463
+\lst@framebox=\box63
464
+)
465
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/latex/listings\listings.cfg
466
+File: listings.cfg 2023/02/27 1.9 listings configuration
467
+))
468
+Package: listings 2023/02/27 1.9 (Carsten Heinz)
469
+
470
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/latex/algorithm2e\algorithm2
471
+e.sty
472
+Package: algorithm2e 2017/07/18 v5.2 algorithms environments
473
+\c@AlgoLine=\count293
474
+\algocf@hangindent=\skip54
475
+
476
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/latex/ifoddpage\ifoddpage.st
477
+y
478
+Package: ifoddpage 2022/10/18 v1.2 Conditionals for odd/even page detection
479
+\c@checkoddpage=\count294
480
+) (d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/latex/relsize\relsize.sty
481
+Package: relsize 2013/03/29 ver 4.1
482
+)
483
+\skiptotal=\skip55
484
+\skiplinenumber=\skip56
485
+\skiprule=\skip57
486
+\skiphlne=\skip58
487
+\skiptext=\skip59
488
+\skiplength=\skip60
489
+\algomargin=\skip61
490
+\skipalgocfslide=\skip62
491
+\algowidth=\dimen257
492
+\inoutsize=\dimen258
493
+\inoutindent=\dimen259
494
+\interspacetitleruled=\dimen260
495
+\interspacealgoruled=\dimen261
496
+\interspacetitleboxruled=\dimen262
497
+\algocf@ruledwidth=\skip63
498
+\algocf@inoutbox=\box64
499
+\algocf@inputbox=\box65
500
+\AlCapSkip=\skip64
501
+\AlCapHSkip=\skip65
502
+\algoskipindent=\skip66
503
+\algocf@nlbox=\box66
504
+\algocf@hangingbox=\box67
505
+\algocf@untilbox=\box68
506
+\algocf@skipuntil=\skip67
507
+\algocf@capbox=\box69
508
+\algocf@lcaptionbox=\skip68
509
+\algoheightruledefault=\skip69
510
+\algoheightrule=\skip70
511
+\algotitleheightruledefault=\skip71
512
+\algotitleheightrule=\skip72
513
+\c@algocfline=\count295
514
+\c@algocfproc=\count296
515
+\c@algocf=\count297
516
+\algocf@algoframe=\box70
517
+\algocf@algobox=\box71
518
+)
519
+\c@theorem=\count298
520
+
521
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/latex/l3backend\l3backend-pd
522
+ftex.def
523
+File: l3backend-pdftex.def 2023-04-19 L3 backend support: PDF output (pdfTeX)
524
+\l__color_backend_stack_int=\count299
525
+\l__pdf_internal_box=\box72
526
+) (exercises.aux)
527
+\openout1 = `exercises.aux'.
528
+
529
+LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 69.
530
+LaTeX Font Info:    ... okay on input line 69.
531
+LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 69.
532
+LaTeX Font Info:    ... okay on input line 69.
533
+LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 69.
534
+LaTeX Font Info:    ... okay on input line 69.
535
+LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 69.
536
+LaTeX Font Info:    ... okay on input line 69.
537
+LaTeX Font Info:    Checking defaults for TS1/cmr/m/n on input line 69.
538
+LaTeX Font Info:    ... okay on input line 69.
539
+LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 69.
540
+LaTeX Font Info:    ... okay on input line 69.
541
+LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 69.
542
+LaTeX Font Info:    ... okay on input line 69.
543
+
544
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/context/base/mkii\supp-pdf.m
545
+kii
546
+[Loading MPS to PDF converter (version 2006.09.02).]
547
+\scratchcounter=\count300
548
+\scratchdimen=\dimen263
549
+\scratchbox=\box73
550
+\nofMPsegments=\count301
551
+\nofMParguments=\count302
552
+\everyMPshowfont=\toks34
553
+\MPscratchCnt=\count303
554
+\MPscratchDim=\dimen264
555
+\MPnumerator=\count304
556
+\makeMPintoPDFobject=\count305
557
+\everyMPtoPDFconversion=\toks35
558
+)
559
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/latex/epstopdf-pkg\epstopdf-
560
+base.sty
561
+Package: epstopdf-base 2020-01-24 v2.11 Base part for package epstopdf
562
+Package epstopdf-base Info: Redefining graphics rule for `.eps' on input line 4
563
+85.
564
+
565
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/latex/00miktex\epstopdf-sys.
566
+cfg
567
+File: epstopdf-sys.cfg 2021/03/18 v2.0 Configuration of epstopdf for MiKTeX
568
+))
569
+\c@lstlisting=\count306
570
+LaTeX Font Info:    Trying to load font information for U+lasy on input line 72
571
+.
572
+ (d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/latex/base\ulasy.fd
573
+File: ulasy.fd 1998/08/17 v2.2e LaTeX symbol font definitions
574
+)
575
+LaTeX Font Info:    Trying to load font information for U+msa on input line 72.
576
+
577
+
578
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/latex/amsfonts\umsa.fd
579
+File: umsa.fd 2013/01/14 v3.01 AMS symbols A
580
+)
581
+LaTeX Font Info:    Trying to load font information for U+msb on input line 72.
582
+
583
+
584
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/latex/amsfonts\umsb.fd
585
+File: umsb.fd 2013/01/14 v3.01 AMS symbols B
586
+)
587
+(d:\Users\Forest\AppData\Local\Programs\MiKTeX\tex/latex/listings\lstlang1.sty
588
+File: lstlang1.sty 2023/02/27 1.9 listings language file
589
+)
590
+Overfull \hbox (15.0pt too wide) detected at line 108
591
+[][] 
592
+ []
593
+
594
+[1
595
+
596
+{C:/Users/Forest/AppData/Local/MiKTeX/fonts/map/pdftex/pdftex.map}]
597
+(exercises.bbl) [2] (exercises.aux) ) 
598
+Here is how much of TeX's memory you used:
599
+ 16499 strings out of 476410
600
+ 322428 string characters out of 5788642
601
+ 1897845 words of memory out of 5000000
602
+ 36581 multiletter control sequences out of 15000+600000
603
+ 521468 words of font info for 72 fonts, out of 8000000 for 9000
604
+ 1141 hyphenation exceptions out of 8191
605
+ 99i,9n,94p,442b,2016s stack positions out of 10000i,1000n,20000p,200000b,200000s
606
+<d:/Users/Forest/AppData/Local/Programs/Mi
607
+KTeX/fonts/type1/public/amsfonts/cm/cmbx10.pfb><d:/Users/Forest/AppData/Local/P
608
+rograms/MiKTeX/fonts/type1/public/amsfonts/cm/cmbx12.pfb><d:/Users/Forest/AppDa
609
+ta/Local/Programs/MiKTeX/fonts/type1/public/amsfonts/cm/cmmi10.pfb><d:/Users/Fo
610
+rest/AppData/Local/Programs/MiKTeX/fonts/type1/public/amsfonts/cm/cmr10.pfb><d:
611
+/Users/Forest/AppData/Local/Programs/MiKTeX/fonts/type1/public/amsfonts/cm/cmr1
612
+2.pfb><d:/Users/Forest/AppData/Local/Programs/MiKTeX/fonts/type1/public/amsfont
613
+s/cm/cmr17.pfb><d:/Users/Forest/AppData/Local/Programs/MiKTeX/fonts/type1/publi
614
+c/amsfonts/cm/cmr5.pfb><d:/Users/Forest/AppData/Local/Programs/MiKTeX/fonts/typ
615
+e1/public/amsfonts/cm/cmr7.pfb><d:/Users/Forest/AppData/Local/Programs/MiKTeX/f
616
+onts/type1/public/amsfonts/cm/cmsy10.pfb><d:/Users/Forest/AppData/Local/Program
617
+s/MiKTeX/fonts/type1/public/amsfonts/cm/cmti10.pfb><d:/Users/Forest/AppData/Loc
618
+al/Programs/MiKTeX/fonts/type1/public/amsfonts/cm/cmtt8.pfb>
619
+Output written on exercises.pdf (2 pages, 150128 bytes).
620
+PDF statistics:
621
+ 67 PDF objects out of 1000 (max. 8388607)
622
+ 0 named destinations out of 1000 (max. 500000)
623
+ 13 words of extra memory for PDF output out of 10000 (max. 10000000)
624
+

BIN
SemSEpaper/exercises.pdf Прегледај датотеку


BIN
SemSEpaper/exercises.synctex.gz Прегледај датотеку


+ 134
- 0
SemSEpaper/exercises.tex Прегледај датотеку

@@ -0,0 +1,134 @@
1
+\documentclass [10pt]{article}
2
+
3
+  
4
+\usepackage{latexsym}
5
+\usepackage{amssymb}
6
+\usepackage{epsfig} 
7
+\usepackage{fullpage}
8
+\usepackage{enumerate}
9
+\usepackage{xspace}
10
+\usepackage{todonotes}
11
+\usepackage{listings}
12
+\newcommand{\true}{true}
13
+\newcommand{\false}{false}
14
+\usepackage[ruled,linesnumbered]{algorithm2e} % Enables the writing of pseudo code.
15
+
16
+   \pagestyle{plain}
17
+   \bibliographystyle{plain}
18
+
19
+
20
+\title{192.127 Seminar in Software Engineering (Smart Contracts) \\
21
+ SWC-124: Write to Arbitrary Storage Location}
22
+\author{Exercises}
23
+
24
+\date{WT 2023/24}
25
+
26
+\author{\textbf{*** YOUR NAME AND STUDENT ID ***}}
27
+
28
+  \newtheorem{theorem}{Theorem}
29
+  \newtheorem{lemma}[theorem]{Lemma}
30
+  \newtheorem{corollary}[theorem]{Corollary}
31
+  \newtheorem{proposition}[theorem]{Proposition}
32
+  \newtheorem{conjecture}[theorem]{Conjecture}
33
+  \newtheorem{definition}[theorem]{Definition}
34
+  \newtheorem{example}[theorem]{Example}
35
+  \newtheorem{remark}[theorem]{Remark}
36
+  \newtheorem{exercise}[theorem]{Exercise}
37
+
38
+
39
+\renewcommand{\labelenumi}{(\alph{enumi})}
40
+
41
+\usepackage{xcolor}
42
+
43
+\definecolor{codegreen}{rgb}{0,0.6,0}
44
+\definecolor{codegray}{rgb}{0.5,0.5,0.5}
45
+\definecolor{codepurple}{rgb}{0.58,0,0.82}
46
+\definecolor{backcolour}{rgb}{0.95,0.95,0.92}
47
+
48
+\lstdefinestyle{mystyle}{ 
49
+	backgroundcolor=\color{backcolour},   
50
+	commentstyle=\color{codegreen},
51
+	keywordstyle=\color{magenta},
52
+	numberstyle=\tiny\color{codegray},
53
+	stringstyle=\color{codepurple},
54
+	basicstyle=\ttfamily\footnotesize,
55
+	breakatwhitespace=false,         
56
+	breaklines=true,                 
57
+	captionpos=b,                    
58
+	keepspaces=true,                 
59
+	numbers=left,                    
60
+	numbersep=5pt,                  
61
+	showspaces=false,                
62
+	showstringspaces=false,
63
+	showtabs=false,                  
64
+	tabsize=2	
65
+}
66
+
67
+
68
+
69
+\begin{document}
70
+
71
+
72
+\maketitle
73
+
74
+\section{Weakness and consequences}
75
+
76
+\subsection{Solidity storage layout}
77
+
78
+Any contract's storage is a continuous 256-bit address space consisting of 32-bit values. In order to implement dynamically sized data structures like maps and arrays, Solidity distributes their entries in a pseudo-random location. Due to the vast 256-bit range of addresses collisions are statistically extremely improbable and of no practical relevance.
79
+
80
+\medspace
81
+
82
+In the case of a dynamic array at variable slot $p$, data is written to continuous locations starting at $keccak(p)$. The array itself contains the length information. It is worth noting that Solidity does not come with utility functions to manipulate arrays, and the developer is required to correctly maintain the length value in order to keep track of the array's state.
83
+
84
+\medspace
85
+
86
+For maps stored in variable slot $p$ the data for index $k$ can be found at $keccak(k . p)$ where $.$ is the concatenation operator.
87
+
88
+\subsection{The Weakness}
89
+
90
+Any unchecked array write is potentially dangerous, as the storage-location of all variables is publicly known and an unconstrained array index can be reverse engineered to target them.
91
+
92
+\lstset{style=mystyle}
93
+\begin{algorithm}
94
+	\begin{lstlisting}[language=Octave]
95
+		pragma solidity 0.4.25;
96
+		
97
+		contract MyContract {
98
+			uint[] private arr;
99
+			address private owner;
100
+			
101
+			function write(unit index, uint value) {
102
+				arr[index] = value;
103
+			}
104
+		}
105
+	\end{lstlisting}
106
+	\caption{A completely unchecked array write}
107
+	\label{alg:agf-opt-merge}
108
+\end{algorithm}
109
+
110
+In the case of dynamic arrays an improper constraint of the $length$ can be dangerous. As $length$ is unsigned, it is possible to underflow it past $2^{256} - 1$ by decrementing the length below zero, thereby effectively marking the whole address space as part of it.
111
+
112
+\section{Vulnerable contracts in literature}
113
+
114
+collect vulnerable contracts used by different papers to motivate/illustrate the weakness
115
+
116
+\section{Code properties and automatic detection}
117
+
118
+summarize the code properties that tools are looking for so that they can detect the weakness
119
+
120
+\section{Exploit sketch}
121
+
122
+sketch ways to potentially exploit the different variants of the weakness.
123
+
124
+%remove this later%
125
+\cite{10.1145/3243734.3243780}
126
+\cite{10.1145/3578527.3578538}
127
+\cite{217464}
128
+\cite{9678888}
129
+
130
+\bibliography{exercise.bib}
131
+
132
+\end{document}
133
+
134
+

Loading…
Откажи
Сачувај