[PATCH 09/10] Add fuzzer-generated tests
Daniel Axtens
dja at axtens.net
Wed Jun 28 17:48:51 AEST 2017
This is the set of tests I generated while fuzzing the parser.
Add them so we don't regress.
Signed-off-by: Daniel Axtens <dja at axtens.net>
---
patchwork/tests/__init__.py | 1 +
patchwork/tests/fuzztests/base64err.mbox | 46 ++++++++
patchwork/tests/fuzztests/charset.mbox | 131 +++++++++++++++++++++++
patchwork/tests/fuzztests/codec-null.mbox | Bin 0 -> 8192 bytes
patchwork/tests/fuzztests/date-oserror.mbox | Bin 0 -> 8209 bytes
patchwork/tests/fuzztests/date-too-long.mbox | Bin 0 -> 1828 bytes
patchwork/tests/fuzztests/date.mbox | 44 ++++++++
patchwork/tests/fuzztests/dateheader.mbox | Bin 0 -> 580 bytes
patchwork/tests/fuzztests/earlyfail.mbox | Bin 0 -> 1712 bytes
patchwork/tests/fuzztests/msgid-len.mbox | Bin 0 -> 1809 bytes
patchwork/tests/fuzztests/msgid-len2.mbox | 37 +++++++
patchwork/tests/fuzztests/msgidheader.mbox | 131 +++++++++++++++++++++++
patchwork/tests/fuzztests/refshdr.mbox | Bin 0 -> 816 bytes
patchwork/tests/fuzztests/unknown-encoding.mbox | Bin 0 -> 1751 bytes
patchwork/tests/fuzztests/value2.mbox | Bin 0 -> 1598 bytes
patchwork/tests/fuzztests/year-out-of-range.mbox | Bin 0 -> 1660 bytes
patchwork/tests/test_parser.py | 57 +++++++++-
17 files changed, 444 insertions(+), 3 deletions(-)
create mode 100644 patchwork/tests/fuzztests/base64err.mbox
create mode 100644 patchwork/tests/fuzztests/charset.mbox
create mode 100644 patchwork/tests/fuzztests/codec-null.mbox
create mode 100644 patchwork/tests/fuzztests/date-oserror.mbox
create mode 100644 patchwork/tests/fuzztests/date-too-long.mbox
create mode 100644 patchwork/tests/fuzztests/date.mbox
create mode 100644 patchwork/tests/fuzztests/dateheader.mbox
create mode 100644 patchwork/tests/fuzztests/earlyfail.mbox
create mode 100644 patchwork/tests/fuzztests/msgid-len.mbox
create mode 100644 patchwork/tests/fuzztests/msgid-len2.mbox
create mode 100644 patchwork/tests/fuzztests/msgidheader.mbox
create mode 100644 patchwork/tests/fuzztests/refshdr.mbox
create mode 100644 patchwork/tests/fuzztests/unknown-encoding.mbox
create mode 100644 patchwork/tests/fuzztests/value2.mbox
create mode 100644 patchwork/tests/fuzztests/year-out-of-range.mbox
diff --git a/patchwork/tests/__init__.py b/patchwork/tests/__init__.py
index 8bdf1a6746db..cbe2b5d081dc 100644
--- a/patchwork/tests/__init__.py
+++ b/patchwork/tests/__init__.py
@@ -21,3 +21,4 @@ import os
TEST_MAIL_DIR = os.path.join(os.path.dirname(__file__), 'mail')
TEST_PATCH_DIR = os.path.join(os.path.dirname(__file__), 'patches')
+TEST_FUZZ_DIR = os.path.join(os.path.dirname(__file__), 'fuzztests')
diff --git a/patchwork/tests/fuzztests/base64err.mbox b/patchwork/tests/fuzztests/base64err.mbox
new file mode 100644
index 000000000000..9756d5c9c44e
--- /dev/null
+++ b/patchwork/tests/fuzztests/base64err.mbox
@@ -0,0 +1,46 @@
+From pat016
+Content-TCpe: text/plain; charset="utf-8"
+MIon: 1.0
+Content-Transfer-Encoding: 8bit
+Subject:: Up entry for B01X ARM
+From: =?utf-8?b?UmFmYcWCo alho Chehab <mchehab at osgIE1pxYJlY2tp?= <.com>
+X-: 913
+Message-Id: <1m>
+To: Fan Flli m>
+Cc: bcm-kist at broadcom.com,
+ =?UTF-8?q?Rafa=C5=82=20Mi=C5:82ecki?= <zajec5 at gmail.com>,
+ An Morton <akpm at linux-foundation.org>,
+ "David S. MilYer" <d F:*
+
+vemloft.net>,
+ Greg Kroah-Hartman <inuxfoundaton.org>,
+ Mauro alho Chehab <mchehab at osg.samsung.com>,
+ Guenter Roeck <linux at roeck-us.net>, Jiri Slaby <cz>,
+ linux-kernel at vger.kernel.org ( list)
+Date:, 1 Jun 2016 22:00:54 +02
+Adh
+bci.
+
+>
+---
+ M++-
+(-)
+
+diff --ER@
+4
+--- a/ERS
++++ S
+@@ -2511,10 +2511,12 @@ F:*
+
+ BROURE
+ M: >
++Mfał
+ L:g
++Lcom
+ S: ed
+
+-F:
++F:i
+ F70*
+
+ B
diff --git a/patchwork/tests/fuzztests/charset.mbox b/patchwork/tests/fuzztests/charset.mbox
new file mode 100644
index 000000000000..a8a40c81f8d2
--- /dev/null
+++ b/patchwork/tests/fuzztests/charset.mbox
@@ -0,0 +1,131 @@
+Received: with ECARTIS (v1.0.0; list lin; Tue, 06 Dec 2011 01:49:42 +0100 (CET)
+ived: from mcom 337 O
+ om" -OK)
+ by eddi with ESMTP id SAth PT
+ >); Tue, 6 Dec 2011 9:37 +0100
+Received:m caexch.com (Not Verified[092.168.16.9]) by mail3.caviumnetworks.com with Mal (
+ id 00>; Mon, 05 Dec 2011 1604 -
+Received: from .caveonetworks.com ([192.168.16.9]) by caexch01.caveonetworks.com with M SMT
+ n, 5 Dec 2011 1636 -
+Received: from dd1.caveonetworks.com ([64.2.3.195]) by caexch01.caveonetworks.com over TLS red channel with Microsoft SMTPS790.4675);
+ Mon, 5 Dec 2011 9:35 -0800
+Message-ID: <m>
+Date:on, 05 Dec 2011 16:49:35 -0800
+From:avid Daney <om>
+nt: lla/5.0 (X11; U; Linux x86_64; en-US; rv5) Gecko/20101027 Fedora/3.0.10-1.fc12 T0
+MIon: 1.0
+To: tils <big>
+CC: s <l>,
+ l Lauss >,
+ n MIPS <>
+Subject: [Patch]: Fix ld p38 Fres on m.
+Content-Type: multipart/mixed;
+ boundary="------------080709040708040308010506"
+X-inalArrivalTime: 06 Dec 2011 00:49:35.0825 (UTC) FILETIME=[ECF8DC10:01CCB3B0]
+Reh: <om>
+o: <tis -s ls"> (uid 0)
+cpt:g
+Or: rfrg
+Xn: 3
+X-eon: tis .0
+Sr: lorg
+o: lorg
+r: dm
+Pr: bulk
+Xt: ls
+
+Tat.
+--------------080709040708040308010506
+Content-Type: text/plain; charset=ISO-8859-1;mat=ed
+Content-Transfer-Encoding: 7bit
+
+e
+S.
+
+T
+sym
+vere
+rer
+
+
+Sim
+sag
+P"
+
+
+Ine
+'s.
+
+
+ex.
+
+Tnu
+
+?
+
+2
+
+ *ld.
+n a
+t.
+ Set
+
+
+--------------080709040708040308010506
+Content-Type: text/plain;
+ ="dd"
+Content-Transfer-Encoding:t
+Con: at;
+ "
+
+Index: bfd.h
+===
+,v
+r
+difh
+--- bf
++++ bfd
+@@ -198,6 +198,8 @@try
+ u
+
+ 1;
+ */
++ u 1;
+
+ */
+ ;
+In.c
+===
+Rv
+re430
+nk.c
+--- bfd430
++++ 000
+@@ -1946,6 +1946,9 @@ _bct
+ r)
+
+
++
++ E;
++
+ );
+
+
+Ind
+===
+RCS,v
+r
+dif
+--- bfd96
++++ b0
+@@ -7260,6 +7260,7 @@
+ bh;
+ 0;
+ 1;
++ 1;
+
+
+ ))
+
+--------------080709040708040308010506--
+
diff --git a/patchwork/tests/fuzztests/codec-null.mbox b/patchwork/tests/fuzztests/codec-null.mbox
new file mode 100644
index 0000000000000000000000000000000000000000..e31b3f6958b0e28c70b88946a6f45ce046e85136
GIT binary patch
literal 8192
zcmdT}>vG#hmiAxc3HIknQadGEBG~|l3mHeTEz7Ysw&RtQ?Cf||s3y=LF$4hy7m3Qu
z?Cg8)!(_kHxR9dcs(33^v&&M6V5861=iaAJzb^6>Z4#NMc|CSbPu`MclW?Y%ITa3B
z!t{)jJgZbz4K8ojYD$&bRHJn&lk95>7qTc-_05;{qeqXTFO7F+?@k9lsiI8sY)a-(
zY-tObm9Z)Yr&*XsNj9I7H%ltxqMrR(h1HZkW~w^6wvNn^bwzldQlgadg=IS9DHUp!
zUn^3Zb((}pMOc)|<!o?VE{%7pEahAc&Y~$jO9wl`JfE**k`BXsb!=SbQ<AcHzE;`1
zu8KTMHp56A(Jz&XW%fKT=fhI2$~v3#{3D9wwOT#b|I<9KhG5A!38$1MS-lzDtU+@<
zSH*CticF=$yqF&`+mX7yH*Qe-X=odYd$Z_mlF^?QGMm%0Pss2}RxrS24YpyVcWf)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q%H>L}f>7ej(socQHUdi#BByWA
zyX!gdCgvUvc%Mx;X<z*N#fjEHl{2ZuIz?>sq`t>~xYZ*95MB|p9>1k)-k<{+hS*1|
zU;qB=uf^fUVI8_#fQbhuxeH*4XxvC&-j*T!C(x`1C?Hg!&A^JVoF2pzp1lX+3g4BA
z1-QM~@~@ctEt%=ubpqe?tkCyjkm(h%JeE@|vvNC;2}eM<H7cqpg)T{x<QP#xW0U+D
zIUadFjVJs(_E3Y9?@(mX*yj=04sV5ru;f1vS0H9P8H6SXF-_0+#@nAEX5y#K2otns
zLPMA>!ZUkzOb&Np$-~8pUSvEbgehu&=4irPFh}SPyX21vbw%Vf)W$ZSc*rqG_h%pO
zSfbmdX?K%u!g7C;_9hI#yEN&&zt0fZppRSCjXfPC-|IUK6igY;G6UUMdh}n99_d?~
z*Epc2xQGcAj?^fX(N^Hnr{E)YkK&Et_IGQyX$zN!VO<p5{Vs13wBEUWK0_+zwgg`-
zaR;u<aSkxh<HMmjU!&ELXS<!c^hVy6U;!--oEo^J#YbxHx!tSy=f+H-Rgb<NC%L<+
z3;ne-KAyMjLhgs$X|?HI8Y6PckWUBPGSq!Ay%zV?xM4))BCpXGL$hzDfEH06cZ}>L
z%KyK2Aa4||chDZt*Dh1z at mWl_dHqnU5gNgv;HYhVa$}O!*B`tIEm%3jJsumA?^Qng
zg5^_pB7Y^HaD#D(JB|mgS;p{Cv|iX<%Y#Go3lLzx|Gi6l-7*|XSGbNJ{(ko^_K|7v
z#f$#_eQ#d29Xt*Wv|c`at8#wtR%P(G4T1Jn1*(6HMDWRW+T**8w8!n_2YY8^9PXhX
x0=;eS at FL$%_4N^0HoBXmX?w3 at YJIsA{e4$ockTrKS9evPp|Sh-Q2+Nd_CGUCp0fY|
literal 0
HcmV?d00001
diff --git a/patchwork/tests/fuzztests/date-oserror.mbox b/patchwork/tests/fuzztests/date-oserror.mbox
new file mode 100644
index 0000000000000000000000000000000000000000..36b8837766601706f359b663217a8d2473f16da6
GIT binary patch
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{bsc<4J>T9zNaA#2-<(|!dIW;%}g1t1HJ5e1MF#(h+|6P;e|(8M^K
zSJ)2;Oe4dd5U1sL>4L{63I)eHb(ab#&TE|sFkc5!fHLHQ!C4v*u2Gx at S)5#>W^akS
zIO9U=r=Ph%_=sVVVk<b`%&$>AzKc{M`2kEhbgp}fp_6>3S<wz)ASLHlI38nNaUz_p
z2 at xmke1Ulfw>PA+imR=VMcCjqhFJuC1JEUyE<^&Itbu<(GOXEYX$^>P4G}L?#d~>G
z0Jg^--shvjuQ?mQc{Zkz<-2BWgF^t%LA~WK037FE;B$d~T0N;dx-Tmgr!MQJ<-!HX
zdQHzkdZv1FyNFkdu{mD<g_Ie_NAbIk6ScMJeQ(cBkyg+3dJfh>gOjmaU_kURy?`wi
z4FJUl9snfV(H4BHX<zv at 0~ibBVg}-E7Qj8M%qb4o%6!5`!{StywcrHjTLjy~*-xbi
zy$r$pTe%1x%jX=c at E!#;xRhFyzVhqdZ)3o{Io|dL at HU(7-BZbpw#_*BQt8Hs9FrIS
zu^?ZVPYwyL3Br+LjuP`+yR96L`Gn6(;xX`t3)HhdP891+Js05g4w*uLVX((8j+Rac
z(!RwKgDPm)^IU}A{Q?md;LpnEije*{<=ju^P-h%M244(yiq{2~7xGYH$fJ<n?XvWy
znB~0>?x2+{ya>}20Od(G2Pg~St=;qT!}-E{-G_sMOd-2_jF at 5I9%lN3LUxe#O(8q&
HYnt|d&ew-A
literal 0
HcmV?d00001
diff --git a/patchwork/tests/fuzztests/date-too-long.mbox b/patchwork/tests/fuzztests/date-too-long.mbox
new file mode 100644
index 0000000000000000000000000000000000000000..e0642a435ce42520dfac8616a4c7ab4af0779ca6
GIT binary patch
literal 1828
zcmbtUZExa65YE at kr~3uflrMz?n_cibA(tM3iYn-$Gf^W&(aG2g_+qb-y(ZA#(f`!H
z)mca`m%FO1)U{ytWp-Ykd1fbNkz<xF;G>9>0Gk<d?pq!%_87GWXyLE5#2(`oa+h&5
zU>2n+z<4#ll1 at lX{GMky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ZaNgAV)zLrX
zWb|zp+KBaGPMfsE0l6{bgZYnJg39VMkPozTbdl(_cEjiyIJ&W%qaTt!Il at niSOJzT
zf)Syu9gGJg$)$c(4*n^VqlZ!0AtySAXZyZ$%;IR>?Kw<aKS)<w2Ry~anhc$iK}M4D
SXwzJ$qrX<`zgEUD0R933CgutN
literal 0
HcmV?d00001
diff --git a/patchwork/tests/fuzztests/date.mbox b/patchwork/tests/fuzztests/date.mbox
new file mode 100644
index 000000000000..8a9685aab0f8
--- /dev/null
+++ b/patchwork/tests/fuzztests/date.mbox
@@ -0,0 +1,44 @@
+From lib
+Recd: (
+Mait: cmlm
+-Id:
+Sender:
+Date: Wg>
+SctMIon: 1.0
+Content-Transfer-Encoding: 8bit
+Subject:: Up entry for B01X ARM
+From:=?utf-X?b?UmFmYcwCIE1pxYJlY2tp?= <.com>
+X-: 913
+Message-Id: <1m>
+To: Fan Flli m>
+Cc: bcm-kist at broadc}m.c6
+ContentF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5 at gmail.com>,
+ An Morton <akpm at l
nux-foundation.org>,
+ "David S.i iller" <dAvem at divemloft.net>,
+ÿreg Kroah-Hartman <inuxfoundation.org>,
+ Mauro alho Chehab <mchehab at osg.samsung.com>,
+ Kuenter Roeck <linux at roeck-us.net>, Jiri Slaby <cz>,
+ linux-kernel at vger.kernel.org ( list)
+Date:, 1 Jun 2016 22:00:54+0200
+
+Adh
+bci.
+
+1 Jun 2016 22:00:5iLf"--ERS
+4
+--- a/ERS
++++ S
+@@ -2511, +2511,12 @@ F:*
+
+ BROURE
+ M: >
++Mfał
+ L:g
++Lcom
+ Sà ed
+
+-F:
++F:i
+ F70*
+
+ B
diff --git a/patchwork/tests/fuzztests/dateheader.mbox b/patchwork/tests/fuzztests/dateheader.mbox
new file mode 100644
index 0000000000000000000000000000000000000000..7d25b87b6418cf96c41d644aee1082dcc59d54f8
GIT binary patch
literal 580
zcma)3O^?$s5bc%u3tUEBA#JtmV5ez9ToM&%EA5J9p$+1k4=3@`*p-ve&5eIvoT8OD
zBKcX*Gw+RO?5)ua9%KePkry1V56D>Py~Aw4bhbnf?|X$VWgd1M^J*_tAq;o4sbHOU
zg5wWS-2N+L0bfx5`+Ppb*4E}Ijy3Kbe3;_<C*8!5XpW|eVc%y at BDYny@)?i%g!-2_
zp;V}}LZkZ%8(oMNuQN-TKWB>>JczbUD?#qod@}hNLo2o7$Q%lvwCaTFNHQF4Q%!&9
z<S{kf+eSW%VhOJ at -K!!sLo_9fE!;WvJ)aTF+<-2^z*3L0kb17?M|>Wza5|Q(x|#<J
zfDrQL#g$66#Jqkqt>|`B+pM at q|K4s=)t17LjmmW)RmJh!_s3+jCSP}VUy=_WKW_ja
zqG5IzptNM<t#H7u$br|?&VS)`Y-2XbY<z$#in_e`M(yZ%@!2#Ty(3iXz<9oB3R#v&
x$jO1#3JE(;@P^&`xLN^T$uhBf9m9<UT0|}doGk$;-0K$XH;ohj-#ZZke*nVInn(Zu
literal 0
HcmV?d00001
diff --git a/patchwork/tests/fuzztests/earlyfail.mbox b/patchwork/tests/fuzztests/earlyfail.mbox
new file mode 100644
index 0000000000000000000000000000000000000000..47db41d153455d30c260c401d7c5b1ab384b851d
GIT binary patch
literal 1712
zcmbtUTW{h<6wWK>2UKdGj(BNUuruajV8E1(0}@rxMhjIVt+tiH19)SPkv-1BTYgm^
z`sdnnoMn^kHd<9RV$PY1zd4uh^E68njH4C2RqIgV`Ra&4ZGdh3xzN}YP8;SyWF)S)
z1I%a%tXU}2Y&(L5k~TST6&NM)R~0s%y at gI!c7$xZC}2ugNL2eBE^M4varhxkMzBmJ
zmN3QYgId!K)95$crynuBS06Fbs8fwuT5K_)sK_`j%vGKTTV>6zBo=og$fHzCbZh~B
zs*TddS|0ZlOj5)q+6S4rNTP!Z2T)n1g${%4=vAAJ(`mMZ+jbp`yk=K)`dxC{!s&~4
zv+a6+wz^KgI{wx%$;ZlzB^vb<K^EwIqcUrv*J&8(t;E-t*AD>T9bp5W0M7<x^QcR^
z8_~Sn<x+CBMxYHY1qdn<_`U?xh{F+JVgn_E!mYx4Y8aOhMGdy_CZk5&!mXvK77OkQ
z{}Z^$;ybv_0hWQWLAc<n5d6phD1?Pg>yRH4xK|m?GnFBQxrh=3Dl@`OmFF`}dq3uM
z7(pHQ9bEwY1kePiyoy800|OxV%0dw^SQghpQ=C<Ds2B_ps)NMUCbW0pc^)+GA%ig5
z?C7*b>rk)Pc^k%Kw0<}OA{IRGA02{vbpdr+D}7p|DGmtMUYBrh2~M?J0`wiNSfYdz
zLX>b$U$52%Fso4l2z3UU49GG*RTnYGVLWO8#&{hRd5-LBoX>6+T=m6?pzm%1v);XD
zrXDa3ao_6UG*dYeQK>WEpdda`kaGU~h at R*QA|8!B8e23vqQf1&wIUtFud^(=58`E%
z5U+)cS8C0&bWo7G`m)urMX%ZU?);afU&HC_da|6&C*He>KkZ%ljxUAd`<Jat!F<_C
z95QD}c|#NBXyq8^)e)W-QOG=6?~P<GkuW#RC(>4nImII5^UN*UjMEkIi!B|ZdB{AY
z?iS275^{Xv+vg-p=cP>lQ8=Rx=3*ZQksjcB7i76I-fZ#4>h(H(%NZnr at tDIWy??E?
z?&^Q=yLge`4`*j*pZNVeuP?HCc<SFNLejrsUt(ZNN&H7KIQ?G3#X6fFj>jfraeS?V
z?Z4 at ulvc>PV0p0~S|l&$`?lNogCWWG2@`*RQ6Du5xzq_M`0)l`owWN&x?$gaRPUqO
ux=mMbz at _anI$-6m)sBEFBsf8q^js&OWzD}@jlUVspD$|qOcV5FfxiKOG^T|B
literal 0
HcmV?d00001
diff --git a/patchwork/tests/fuzztests/msgid-len.mbox b/patchwork/tests/fuzztests/msgid-len.mbox
new file mode 100644
index 0000000000000000000000000000000000000000..2339b3ccd20bab1acf215947b8f2c7198616a3df
GIT binary patch
literal 1809
zcmbVM-EQJW6pmEwMb0bi%@J2&!Dh^_F&Ic7Y|#d76oZ;7TCE0q0B`(5#{&z!X!{0z
zi#}W5B0XcWn`k$xs$wzY at t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uiOfx<cU
z1OY!L<^M!=oU?!@e*{6{UqVp&&OxrIpbFZ-K<p{M%fMWN>$*_hfrKDjuC*`p9ZIE=
zzJ|d74XbUJn^@ADje~)b2SCKFUi2R=0)10~5`9C<p_ox0u|sA|KZpO)ORw|UuX~BG
z>ot~}VKfJhX6ntO9opMu2tO`-1t^Oe5=z>@Wrub$smDrgpCZXE+zh>Pe2n2SgrMC#
rMsY-MRhw);QRuzg(&&JvxLCV-Lu3R<ag^v?hoc{=?ElD&VF3ICrE2Y|
literal 0
HcmV?d00001
diff --git a/patchwork/tests/fuzztests/msgid-len2.mbox b/patchwork/tests/fuzztests/msgid-len2.mbox
new file mode 100644
index 000000000000..53fa874152b4
--- /dev/null
+++ b/patchwork/tests/fuzztests/msgid-len2.mbox
@@ -0,0 +1,37 @@
+From ste016
+ath: <st
+From: Sen Fane <steom>
+To: com
+Subject: [PATCH 2/2] test: Cwn
+Date:, 11 Sep 2016 23:22:04 +0100
+Message-ID:>
+X-er: il=2
+In-Reply-To: <1473632524-8585-1-git-send-email-stephenfinucane at gmail.com>References: <1473632524-8585-1-git-send-emaifa=C5=82=20Mi=C5=82ecki?= <zajec5 at gmail.com>,
+ An Mnuxfoundation.oorton <akpm at linuZ-foundation.org>,
+ "David S. Miller" <davem at davemloft.net>,
+ Greg Kroah-Hartman <inuxfoundation.org>,
+ Mauro alho Chehab <mchehab at osg.samungÿÿom>,
+ Guenter Roeck <linux at roeck-us.net>, Jiri Slaby <cz>,
+ linux-kernel at vger.kernel.oundation.oortoorg ( list)
+Date:, 1 Jun 2016 2il.cdm>,
+ An Mnuxfoundat2:00:54 +0200
+
+Adh
+bci.
+
+>
+---
+ M++-
+(-)
+
+diff --ERS
+4
+--- a/ERS
++++ S
+@@ -2511,10 +2511,12 @@ F:*
+
+ BROURE
+ M: >
++Mfał
+ L:g
++Lc B
diff --git a/patchwork/tests/fuzztests/msgidheader.mbox b/patchwork/tests/fuzztests/msgidheader.mbox
new file mode 100644
index 000000000000..e94e82ec1437
--- /dev/null
+++ b/patchwork/tests/fuzztests/msgidheader.mbox
@@ -0,0 +1,131 @@
+Received: with ECARTIS (v1.0.0; list lin; Tue, 06 Dec 2011 01:49:42 +0100 (CET)
+ived: from mcom 337 O
+ om" -OK)
+ by eddi with ESMTP id SAth PT
+ >); Tue, 6 Dec 2011 9:37 +0100
+Received:m caexch.com (Not Verified[192.168.16.9]) by mail3.caviumnetworks.com with Mal (
+ id 00>; Mon, 05 Dec 2011 1604 -
+Received: from .caveonetworks.com ([192.168.16.9]) by caexch01.caveonetworks.com with M SMT
+ n, 5 Dec 2011 1636 -
+Received: from dd1.caveonetworks.com ([64.2.3.195]) by caexch01.caveonetworks.com over TLS red channel with Microsoft SMTPS790.4675);
+ Mon, 5 Dec 2011 9:35 -0800
+Message-ID: <m>
+Date:on, 05 Dec 2011 16:49:35 -0800
+From:avid Daney <om>
+nt: lla/5.0 (X11; U; Linux x86_64; en-US; rv5) Gecko/20101027 Fedora/3.0.10-1.fc12 T0
+MIon: 1.0
+To: tils <big>
+CC: s <l>,
+ l Lauss >,
+ n MIPS <>
+Subject: [Patch]: Fix ld p38 Fres on m.
+Content-Type: multipart/mixed;
+ boundary="------------080709040708040308010506"
+X-inalArrivalTime: 06 Dec 2011 00:49:35.0825 (UTC) FILETIME=[ECF8DC10:01CCB3B0]
+Reh: <om>
+o: <tis -s ls"> (uid 0)
+cpt:g
+Or: rfrg
+Xn: 3
+X-eon: tis .0
+Sr: lorg
+o: lorg
+r: dm
+Pr: bulk
+Xt: ls
+
+Tat.
+--------------080709040708040308010506
+Content-Type: text/plain; charset=ISO-8859-1;mat=ed
+Content-Transfer-Encoding: 7bit
+
+e
+S.
+
+T
+sym
+vere
+rer
+
+
+Sim
+sag
+P"
+
+
+Ine
+'s.
+
+
+ex.
+
+Tnu
+
+?
+
+2
+
+ *ld.
+n a
+t.
+ Set
+
+
+--------------080709040708040308010506
+Content-Type: text/plain;
+ ="dd"
+Content-Transfer-Encoding:t
+Con: at;
+ "
+
+Index: bfd.h
+===
+,v
+r
+difh
+--- bf
++++ bfd
+@@ -198,6 +198,8 @@try
+ u
+
+ 1;
+ */
+ 1;
+
+ */
+ ;
+In.c
+===
+Rv
+re430
+nk.c
+--- bfd430
++++ 000
+@@ -1946,6 +1946,9 @@ _bct
+ r)
+
+
++
++ E;
++
+ );
+
+
+Ind
+===
+RCS,v
+r
+dif
+--- bfd96
++++ b0
+@@ -7260,6 +7260,7 @@
+ bh;
+ 0;
+ 1;
++ 1;
+
+
+ ))
+
+--------------080709040708040308010506--
+
diff --git a/patchwork/tests/fuzztests/refshdr.mbox b/patchwork/tests/fuzztests/refshdr.mbox
new file mode 100644
index 0000000000000000000000000000000000000000..bc7109aa575cdaf2e8d509bffaad39271d287e51
GIT binary patch
literal 816
zcmbV~L66!n5QRC<uNbMPm6?#3u#2n}qGF2{X^~dIVWp~vlnmf1I4Cjg?y39F=}b!7
zdnL!Q9q03VZ#-}6Bes##>=uf6aCqNFn9HKWH3ys*fpv-N;{-Of!)<+p_4(^J-bRO?
zpFeJ9k7x(>3r22bW%eV$LlN2aG0TK-LMvpnLuai^b2Mp|rm*C;E%r={2RDHi;>Mw`
z(840nici%W=}GrlemA at w+L6s^JQ|NEqrH#Rawv(9g|A3toems!KAg9rbGp~nL=;Y7
z#XD{|Y`Og}(B*RZ`5UxcEI&ESk`!ijh#Vqq-cIbq?rR*Js^Y!Z>q%<aFdu=Om8Sr6
z6#zs8vdb7FLqNc716XndDE)4SB?QiM at T?ngQ1bUdI9C<Oe)%??BBlKlP1YadbPDD}
z2?oql-GC|1V4k at J<ImDXZ9<f;<E0(17<8b2SOqG}C{=)z00AkFgh$FF<x%V!A=u<D
z$wAySwWJv*GSCa4#n%dJ71gKgS!mi5SS~arO-Q4HCm*Z@=&ErIL$gr(uMzxJW{fgX
z&+_Ut{<VycT$M at ZI*9pJhOHX*WgiSTM at iB|t{O3-YE`LR;gxEVw$W?q#g$$*nZM*$
oeSfrNWBCI%2N4(m*3sTL07NN|JW at A6i#JlVQi>+px<fRMUmz3JLI3~&
literal 0
HcmV?d00001
diff --git a/patchwork/tests/fuzztests/unknown-encoding.mbox b/patchwork/tests/fuzztests/unknown-encoding.mbox
new file mode 100644
index 0000000000000000000000000000000000000000..f6ce3fe115c5838eae4857c236e1b5804d608771
GIT binary patch
literal 1751
zcmb_cQFG!p5N;o{?|tjT4lg~9*pVTCF%U=$T)7@|nV3v-(`j#nEkGArrm{>)U)n#>
zU)BHA>&jdwchgR$Gc6vplDzu9{dU)y={&<7H_Yomm at 6Zcah4A|5ugzVbGGYayydzO
zW>_oD+VN|!nCB`$&t;GPnyX?hv@=z4o=CL`&|gUdQMr02ViN>-yF&uj54g at XUNP?u
zFK-qwBkll)qY8Mm8r^2I>`nY_IG=jE!<(1so2J=~hB$EJJiCB9C%~T9f(6Ak at MvS1
z2RP#jXK5;t)?pmrD$bmHS(x!k=RBcv_UtJT$rsC+<BxtE-S9OZhV7x>95&fP9;YI{
zmzL>g{!aYR9&a)((~6ajUMgJV+T;oc{C<~>Q>n^>v(8JEa3gc&=6Z8MezghT%LF4A
z7cxzSuHhizdy$Q+G0oS;Rl-=$7g}ua8wzmie9g7VNW;K_{vC6{OPwQ6w>gGevE?fq
zWN|ea=f%b?cvh5Z^H-!VNQP4uM;d%7wZtf~^;1fu_>(kSTwt_V0tr&5*v5&7vB^9S
zdqJy>4yCpz_(nMM38k1aI^jkH)|Gwa>ve*2^1mhjs(_X12 at Y(HlnF3R`B~d#*uL|;
zKHm26mDPp^zw@?p-lslrZlgZxeY=h};QWjtpr_fznMiWY&sr{XJ?41sI`*2lWFK{$
zExC~ph5=%MgVbg-rJ1!<rulV*g9|wJ+)N%YO>o!pai&FqRKU!wdN#nUO!|PVQ=_hu
zil>)a%RNt*GNa~VoyWv5R*5A&ezT3wZkJ&lXY*In<$N(6em4zg{v`BRz`QWLYF)AK
z;YMtO3&?{4odVOMc7e}I>IznecxQqQyw(9~=CgCwqS0e*_CHd;r?S~HP?iQpJ{iJV
zZ{Uu;;}&H=*bmzJ(>EPad?|Ib#i%T;lMJrOtjhEr?ren%fF(CBIG_ATPnY#bS@#ot
z|9r2cT&l;rWgfkDe81guyne>bP$W;?EnR!JfIx^`iUW!V1AC!qt%XJah-8L;Xud(X
zuG#fm{f_WeLCy%`V9%%$U<A+vIC-8XE-2(ca!w*a!2ekl-8Qu(sXZaV*mnVPLrqu%
zoU23}D8K8(-NJA<gws7}NaT8JW1)R$G#d6bjK}DBJ^!?W4QqTHkB$Bf5V5p_{i8>q
z&(EMid)1saX^DNxgBw at yHv})vTMX2_`^)<yMPk>MhW*Mu(42RUJY;)Bgl|`|0n~L$
zBSOOxO#5VsvQCs0KPfpfgpt+oC29B|A?bCFDvs#gW`|ky%62U};0dm_1ayL*f5ym?
Sj>gGRjzzE6|7~R)2jEXb-q_p#
literal 0
HcmV?d00001
diff --git a/patchwork/tests/fuzztests/value2.mbox b/patchwork/tests/fuzztests/value2.mbox
new file mode 100644
index 0000000000000000000000000000000000000000..49744ab7cbfcc853ffc4156406f339599cf104a6
GIT binary patch
literal 1598
zcmaJ>U2Y;r5FWoo+IsR4N=Q*+n;Ck*{0(5R!K}Oq+6b^@X%nrQnFeM((@lDMFwRSI
zfjs31IYsV}1LYx-Qw=8Gti35j^<PzW%~#dmP^%PI+%UfeeI<>M#+}};M1V$YOlg(y
z*l`{nmRx6#hnmZ5F0^|oLlwnx5#R#}O!C<W5t<;t>lIQIeUEdc at q+m`cs?G%kS+?a
z)6LD?ZFFbd>*lBO?bW5f+NkslZrlKyeg#G%%lJaLS5bg%KP{iZR0TNX5{F3=BU$#t
z;CvRQ?rofz-b^bVeXmk4RA~|DuIuU0Iq3e_9rHQw^sAjlxl?ANcsCW{ZQSi(`zKC$
zS9^<;$BFekBiD0 at Bjp?_iL-g+EuqutKyeKkqIkXpB|W7V)~+z%>o~%Rhod-2gf3t^
z;%kxiwmMOF#*@Nv4jg=~#S*{yL-D1FpZrHW*9v*EWRBxR)uR^Bz1UxhC7)qC4Y!lt
z7kg3J!pnG?<#Msl^i57!3yot%--GQWmieZq?ZVA7y4;)<@lAqvv038iKGZ5xbAyx7
z)SuLwAKxmASjB+|vCMoQn?a?DE^9FMRD?m`91!FKZba}anKS%f3HY3#8E`4?v2Cj=
zO at K+lOI45Iq2v24ymp*F|06=W*OM0Nb at d2e(>JIRWkbJm9fu-PnwKgb^L*y|-aPcn
zIHmNilnl`K*tR!JoMhOZ#S3bUet<}e#1`ro!Z*({v~#NM)prwYpTT5<NrbCP1BY5<
zNaaqw$5&vBW?w;?CnjETZAxjp5fK$=rgBNqoKC at Y4-ef(A*kxC$xcZ(NLNVvtjcNy
zYUWt-<Xr1`&68=&YELLL7Mxn7JMS+0!^WWRvw->i{zc`2{QzUJq^`HXQO~zcoS~ax
zk`>DMbxy#tBM4U}SioBypaw-+QCC{yMCs%fZVX}a(l!}n at cXCoLhjE9;hiOf-(uOq
z&=P`0Ve-~(G^$P4Z>8LHMD+K?o<x3r#uN2fYybqp!~>W at cAvspXj*IW*O!vUuQEEo
zW3jR4G6(1almT8HCy at t-$iaB<Y9c5I>~Y_XpF{uI7d%p$q&jvAQB-&`c%-%7<@@mC
z#=j%>84&*eHvW$DjCBl<8wykaxRR0B1TT^WB}n^la&lsiq1Qv#Z#IfGJh4Lqdp)8`
zpqG?eW&h|?P?{W<09zE=3%C3;CjJqp6$S^lw6hBv*|iPL=%MaHpVm%n>{_u&q4E7J
oG=TcZ283~cvL~^<f3voAFYLVQ<r=e at ZO6LxC%eyK>$(8{0J0^$_W%F@
literal 0
HcmV?d00001
diff --git a/patchwork/tests/fuzztests/year-out-of-range.mbox b/patchwork/tests/fuzztests/year-out-of-range.mbox
new file mode 100644
index 0000000000000000000000000000000000000000..2dd609b0ca8c0aa80542e05f6a90831b9218002b
GIT binary patch
literal 1660
zcmah}TWjM+6c(iva^CxXa39)49(yFqHzjtxI5BHT*buuAD9a*CV|%*N$c#p50(~g-
zsXw~3=g4fbSxPIUx$8TZ`M$HTWr3AbG8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EV$BVGgh=gK7ihFJowUKb
zBRm!LB$$u1Lcy^up0k`JmC{B}<7jXMjt0S)knzJNb%6GiAz59BSLf7|q0^%oBoo=u
z!hF?!pmOEu?I-;4;OO>QgFXxglF^%f$moD4xY?h>HzyvE at Hyjh^r;~Ky9lT}z&`-O
BtP=nL
literal 0
HcmV?d00001
diff --git a/patchwork/tests/test_parser.py b/patchwork/tests/test_parser.py
index 57a3f0decfde..80a559ec871b 100644
--- a/patchwork/tests/test_parser.py
+++ b/patchwork/tests/test_parser.py
@@ -26,6 +26,7 @@ import os
from django.test import TestCase
from django.utils import six
+from unittest import skipIf
from patchwork.models import Comment
from patchwork.models import Patch
@@ -43,6 +44,7 @@ from patchwork.parser import parse_version
from patchwork.parser import split_prefixes
from patchwork.parser import subject_check
from patchwork.tests import TEST_MAIL_DIR
+from patchwork.tests import TEST_FUZZ_DIR
from patchwork.tests.utils import create_project
from patchwork.tests.utils import create_series
from patchwork.tests.utils import create_series_reference
@@ -52,15 +54,20 @@ from patchwork.tests.utils import read_patch
from patchwork.tests.utils import SAMPLE_DIFF
-def read_mail(filename, project=None):
- """Read a mail from a file."""
- file_path = os.path.join(TEST_MAIL_DIR, filename)
+def load_mail(file_path):
if six.PY3:
with open(file_path, 'rb') as f:
mail = email.message_from_binary_file(f)
else:
with open(file_path) as f:
mail = email.message_from_file(f)
+ return mail
+
+
+def read_mail(filename, project=None):
+ """Read a mail from a file."""
+ file_path = os.path.join(TEST_MAIL_DIR, filename)
+ mail = load_mail(file_path)
if 'Message-Id' not in mail:
mail['Message-Id'] = make_msgid()
if project:
@@ -819,3 +826,47 @@ class SubjectTest(TestCase):
self.assertEqual(parse_version('Hello, world', ['v10']), 10)
self.assertEqual(parse_version('Hello, world (v2)', []), 2)
self.assertEqual(parse_version('Hello, world (V6)', []), 6)
+
+
+class FuzzTest(TestCase):
+ """Test fuzzed patches."""
+ def setUp(self):
+ create_project(listid="patchwork.ozlabs.org")
+
+ def _test_patch(self, name):
+ file_path = os.path.join(TEST_FUZZ_DIR, name)
+ m = load_mail(file_path)
+ try:
+ parse_mail(m, list_id="patchwork.ozlabs.org")
+ except ValueError:
+ pass
+
+ @skipIf(six.PY2, "breaks only on python3")
+ def test_early_fail(self):
+ file_path = os.path.join(TEST_FUZZ_DIR, 'earlyfail.mbox')
+ with self.assertRaises(AttributeError):
+ load_mail(file_path)
+
+ def test_base64err(self):
+ self._test_patch('base64err.mbox')
+
+ def test_codec(self):
+ self._test_patch('codec-null.mbox')
+ self._test_patch('charset.mbox')
+ self._test_patch('unknown-encoding.mbox')
+ self._test_patch('value2.mbox')
+
+ def test_date(self):
+ self._test_patch('date.mbox')
+ self._test_patch('date-too-long.mbox')
+ self._test_patch('year-out-of-range.mbox')
+ self._test_patch('date-oserror.mbox')
+
+ def test_msgid(self):
+ self._test_patch('msgid-len.mbox')
+ self._test_patch('msgid-len2.mbox')
+
+ def test_hdr(self):
+ self._test_patch('refshdr.mbox')
+ self._test_patch('dateheader.mbox')
+ self._test_patch('msgidheader.mbox')
--
2.11.0
More information about the Patchwork
mailing list