Changes 90 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803
  1. __ __ _
  2. ___\ \/ /_ __ __ _| |_
  3. / _ \\ /| '_ \ / _` | __|
  4. | __// \| |_) | (_| | |_
  5. \___/_/\_\ .__/ \__,_|\__|
  6. |_| XML parser
  7. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  8. !! <blink>Expat is UNDERSTAFFED and WITHOUT FUNDING.</blink> !!
  9. !! ~~~~~~~~~~~~ !!
  10. !! The following topics need *additional skilled C developers* to progress !!
  11. !! in a timely manner or at all (loosely ordered by descending priority): !!
  12. !! !!
  13. !! - teaming up on researching and fixing future security reports and !!
  14. !! ClusterFuzz findings with few-days-max response times in communication !!
  15. !! in order to (1) have a sound fix ready before the end of a 90 days !!
  16. !! grace period and (2) in a sustainable manner, !!
  17. !! - helping CPython Expat bindings with supporting Expat's amplification !!
  18. !! attack protection API (https://github.com/python/cpython/issues/90949): !!
  19. !! - XML_SetAllocTrackerActivationThreshold !!
  20. !! - XML_SetAllocTrackerMaximumAmplification !!
  21. !! - XML_SetBillionLaughsAttackProtectionActivationThreshold !!
  22. !! - XML_SetBillionLaughsAttackProtectionMaximumAmplification !!
  23. !! - helping Perl's XML::Parser Expat bindings with supporting Expat's !!
  24. !! security API (https://github.com/cpan-authors/XML-Parser/issues/102): !!
  25. !! - XML_SetAllocTrackerActivationThreshold !!
  26. !! - XML_SetAllocTrackerMaximumAmplification !!
  27. !! - XML_SetBillionLaughsAttackProtectionActivationThreshold !!
  28. !! - XML_SetBillionLaughsAttackProtectionMaximumAmplification !!
  29. !! - XML_SetReparseDeferralEnabled !!
  30. !! - implementing and auto-testing XML 1.0r5 support !!
  31. !! (needs discussion before pull requests), !!
  32. !! - smart ideas on fixing the Autotools CMake files generation issue !!
  33. !! without breaking CI (needs discussion before pull requests), !!
  34. !! - pushing migration from `int` to `size_t` further !!
  35. !! including edge-cases test coverage (needs discussion before anything). !!
  36. !! !!
  37. !! For details, please reach out via e-mail to [email protected] so we !!
  38. !! can schedule a voice call on the topic, in English or German. !!
  39. !! !!
  40. !! THANK YOU! Sebastian Pipping -- Berlin, 2024-03-09 !!
  41. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  42. Release 2.7.3 Wed September 24 2025
  43. Security fixes:
  44. #1046 #1048 Fix alignment of internal allocations for some non-amd64
  45. architectures (e.g. sparc32); fixes up on the fix to
  46. CVE-2025-59375 from #1034 (of Expat 2.7.2 and related
  47. backports)
  48. #1059 Fix a class of false positives where input should have been
  49. rejected with error XML_ERROR_ASYNC_ENTITY; regression from
  50. CVE-2024-8176 fix pull request #973 (of Expat 2.7.0 and
  51. related backports). Please check the added unit tests for
  52. example documents.
  53. Other changes:
  54. #1043 Prove and regression-proof absence of integer overflow
  55. from function expat_realloc
  56. #1062 Remove "harmless" cast that truncated a size_t to unsigned
  57. #1049 Autotools: Remove "ln -s" discovery
  58. #1054 docs: Be consistent with use of floating point around
  59. XML_SetAllocTrackerMaximumAmplification
  60. #1056 docs: Make it explicit that XML_GetCurrentColumnNumber
  61. starts at 0
  62. #1057 docs: Better integrate the effect of the activation
  63. thresholds
  64. #1058 docs: Fix an in-comment typo in expat.h
  65. #1045 docs: Fix a typo in README.md
  66. #1041 docs: Improve change log of release 2.7.2
  67. #1053 xmlwf: Resolve use of functions XML_GetErrorLineNumber
  68. and XML_GetErrorColumnNumber
  69. #1032 Windows: Normalize .bat files to CRLF line endings
  70. #1060 #1061 Version info bumped from 12:0:11 (libexpat*.so.1.11.0)
  71. to 12:1:11 (libexpat*.so.1.11.1); see https://verbump.de/
  72. for what these numbers do
  73. Infrastructure:
  74. #1047 #1050 CI: Cleanup UndefinedBehaviorSanitizer fatality
  75. #1044 CI|Linux: Stop aborting at first job failure
  76. #1052 CI|FreeBSD: Upgrade to FreeBSD 15.0
  77. #1039 CI|FreeBSD: Do not install CMake meta-package
  78. Special thanks to:
  79. Bénédikt Tran
  80. Berkay Eren Ürün
  81. Daniel Engberg
  82. Hanno Böck
  83. Matthew Fernandez
  84. Rolf Eike Beer
  85. Sam James
  86. Tim Bray
  87. and
  88. Clang/GCC UndefinedBehaviorSanitizer
  89. OSS-Fuzz / ClusterFuzz
  90. Z3 Theorem Prover
  91. Release 2.7.2 Tue September 16 2025
  92. Security fixes:
  93. #1018 #1034 CVE-2025-59375 -- Disallow use of disproportional amounts of
  94. dynamic memory from within an Expat parser (e.g. previously
  95. a ~250 KiB sized document was able to cause allocation of
  96. ~800 MiB from the heap, i.e. an "amplification" of factor
  97. ~3,300); once a threshold (that defaults to 64 MiB) is
  98. reached, a maximum amplification factor (that defaults to
  99. 100.0) is enforced, and violating documents are rejected
  100. with an out-of-memory error.
  101. There are two new API functions to fine-tune this new
  102. behavior:
  103. - XML_SetAllocTrackerActivationThreshold
  104. - XML_SetAllocTrackerMaximumAmplification .
  105. If you ever need to increase these defaults for non-attack
  106. XML payload, please file a bug report with libexpat.
  107. There is also a new environment variable
  108. EXPAT_MALLOC_DEBUG=(0|1|2) to control the verbosity
  109. of allocations debugging at runtime, disabled by default.
  110. Known impact is (reliable and easy) denial of service:
  111. CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H/E:H/RL:O/RC:C
  112. (Base Score: 7.5, Temporal Score: 7.2)
  113. Please note that a layer of compression around XML can
  114. significantly reduce the minimum attack payload size.
  115. Distributors intending to backport (or cherry-pick) the
  116. fix need to copy 99% of the related pull request, not just
  117. the "lib: Implement tracking of dynamic memory allocations"
  118. commit, to not end up with a state that literally does both
  119. too much and too little at the same time. Appending ".diff"
  120. to the pull request URL could be of help.
  121. Other changes:
  122. #1008 #1017 Autotools|macOS: Sync CMake templates with CMake 3.31
  123. #1007 CMake: Drop support for CMake <3.15
  124. #1004 CMake: Fix off_t detection for -Werror
  125. #1007 CMake|Windows: Fix -DEXPAT_MSVC_STATIC_CRT=ON
  126. #1013 Windows: Drop support for Visual Studio <=16.0/2019
  127. #1026 xmlwf: Mention supported environment variables in
  128. --help output
  129. #1024 xmlwf: Fix (internal) help generator
  130. #1034 docs: Promote the contract to call function
  131. XML_FreeContentModel when registering a custom
  132. element declaration handler (via a call to function
  133. XML_SetElementDeclHandler)
  134. #1027 docs: Add missing <p>..</p> wrap
  135. #994 docs: Drop AppVeyor badge
  136. #1000 tests: Fix portable_strndup
  137. #1036 Drop casts around malloc/free/realloc that C99 does not need
  138. #1010 Replace empty for loops with while loops
  139. #1011 Add const with internal XmlInitUnknownEncodingNS
  140. #14 #1037 Drop an OpenVMS support leftover
  141. #999 #1001 Address more clang-tidy warnings
  142. #1030 #1038 Version info bumped from 11:2:10 (libexpat*.so.1.10.2)
  143. to 12:0:11 (libexpat*.so.1.11.0); see https://verbump.de/
  144. for what these numbers do
  145. Infrastructure:
  146. #1003 CI: Cover compilation on FreeBSD
  147. #1009 #1035 CI: Upgrade Clang from 19 to 21
  148. #1031 CI: Make calling Cppcheck without --suppress=objectIndex
  149. and --suppress=unknownMacro possible
  150. #1013 CI|Windows: Get off of deprecated image "windows-2019"
  151. #1008 #1017 ..
  152. #1023 #1025 CI: Adapt to breaking changes in GitHub Actions
  153. Special thanks to:
  154. Alexander Bluhm
  155. Neil Pang
  156. Theo Buehler
  157. and
  158. GNU Time
  159. OSS-Fuzz / ClusterFuzz
  160. Perl XML::Parser
  161. Release 2.7.1 Thu March 27 2025
  162. Bug fixes:
  163. #980 #989 Restore event pointer behavior from Expat 2.6.4
  164. (that the fix to CVE-2024-8176 changed in 2.7.0);
  165. affected API functions are:
  166. - XML_GetCurrentByteCount
  167. - XML_GetCurrentByteIndex
  168. - XML_GetCurrentColumnNumber
  169. - XML_GetCurrentLineNumber
  170. - XML_GetInputContext
  171. Other changes:
  172. #976 #977 Autotools: Integrate files "fuzz/xml_lpm_fuzzer.{cpp,proto}"
  173. with Automake that were missing from 2.7.0 release tarballs
  174. #983 #984 Fix printf format specifiers for 32bit Emscripten
  175. #992 docs: Promote OpenSSF Best Practices self-certification
  176. #978 tests/benchmark: Resolve mistaken double close
  177. #986 Address Frama-C warnings
  178. #990 #993 Version info bumped from 11:1:10 (libexpat*.so.1.10.1)
  179. to 11:2:10 (libexpat*.so.1.10.2); see https://verbump.de/
  180. for what these numbers do
  181. Infrastructure:
  182. #982 CI: Start running Perl XML::Parser integration tests
  183. #987 CI: Enforce Clang Static Analyzer clean code
  184. #991 CI: Re-enable warning clang-analyzer-valist.Uninitialized
  185. for clang-tidy
  186. #981 CI: Cover compilation with musl
  187. #983 #984 CI: Cover compilation with 32bit Emscripten
  188. #976 #977 CI: Protect against fuzzer files missing from future
  189. release archives
  190. Special thanks to:
  191. Berkay Eren Ürün
  192. Matthew Fernandez
  193. and
  194. Perl XML::Parser
  195. Release 2.7.0 Thu March 13 2025
  196. Security fixes:
  197. #893 #973 CVE-2024-8176 -- Fix crash from chaining a large number
  198. of entities caused by stack overflow by resolving use of
  199. recursion, for all three uses of entities:
  200. - general entities in character data ("<e>&g1;</e>")
  201. - general entities in attribute values ("<e k1='&g1;'/>")
  202. - parameter entities ("%p1;")
  203. Known impact is (reliable and easy) denial of service:
  204. CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H/E:H/RL:O/RC:C
  205. (Base Score: 7.5, Temporal Score: 7.2)
  206. Please note that a layer of compression around XML can
  207. significantly reduce the minimum attack payload size.
  208. Other changes:
  209. #935 #937 Autotools: Make generated CMake files look for
  210. libexpat.@[email protected] on macOS
  211. #925 Autotools: Sync CMake templates with CMake 3.29
  212. #945 #962 #966 CMake: Drop support for CMake <3.13
  213. #942 CMake: Small fuzzing related improvements
  214. #921 docs: Add missing documentation of error code
  215. XML_ERROR_NOT_STARTED that was introduced with 2.6.4
  216. #941 docs: Document need for C++11 compiler for use from C++
  217. #959 tests/benchmark: Fix a (harmless) TOCTTOU
  218. #944 Windows: Fix installer target location of file xmlwf.xml
  219. for CMake
  220. #953 Windows: Address warning -Wunknown-warning-option
  221. about -Wno-pedantic-ms-format from LLVM MinGW
  222. #971 Address Cppcheck warnings
  223. #969 #970 Mass-migrate links from http:// to https://
  224. #947 #958 ..
  225. #974 #975 Document changes since the previous release
  226. #974 #975 Version info bumped from 11:0:10 (libexpat*.so.1.10.0)
  227. to 11:1:10 (libexpat*.so.1.10.1); see https://verbump.de/
  228. for what these numbers do
  229. Infrastructure:
  230. #926 tests: Increase robustness
  231. #927 #932 ..
  232. #930 #933 tests: Increase test coverage
  233. #617 #950 ..
  234. #951 #952 ..
  235. #954 #955 .. Fuzzing: Add new fuzzer "xml_lpm_fuzzer" based on
  236. #961 Google's libprotobuf-mutator ("LPM")
  237. #957 Fuzzing|CI: Start producing fuzzing code coverage reports
  238. #936 CI: Pass -q -q for LCOV >=2.1 in coverage.sh
  239. #942 CI: Small fuzzing related improvements
  240. #139 #203 ..
  241. #791 #946 CI: Make GitHub Actions build using MSVC on Windows and
  242. produce 32bit and 64bit Windows binaries
  243. #956 CI: Get off of about-to-be-removed Ubuntu 20.04
  244. #960 #964 CI: Start uploading to Coverity Scan for static analysis
  245. #972 CI: Stop loading DTD from the internet to address flaky CI
  246. #971 CI: Adapt to breaking changes in Cppcheck
  247. Special thanks to:
  248. Alexander Gieringer
  249. Berkay Eren Ürün
  250. Hanno Böck
  251. Jann Horn
  252. Mark Brand
  253. Sebastian Andrzej Siewior
  254. Snild Dolkow
  255. Thomas Pröll
  256. Tomas Korbar
  257. valord577
  258. and
  259. Google Project Zero
  260. Linutronix
  261. Red Hat
  262. Siemens
  263. Release 2.6.4 Wed November 6 2024
  264. Security fixes:
  265. #915 CVE-2024-50602 -- Fix crash within function XML_ResumeParser
  266. from a NULL pointer dereference by disallowing function
  267. XML_StopParser to (stop or) suspend an unstarted parser.
  268. A new error code XML_ERROR_NOT_STARTED was introduced to
  269. properly communicate this situation. // CWE-476 CWE-754
  270. Other changes:
  271. #903 CMake: Add alias target "expat::expat"
  272. #905 docs: Document use via CMake >=3.18 with FetchContent
  273. and SOURCE_SUBDIR and its consequences
  274. #902 tests: Reduce use of global parser instance
  275. #904 tests: Resolve duplicate handler
  276. #317 #918 tests: Improve tests on doctype closing (ex CVE-2019-15903)
  277. #914 Fix signedness of format strings
  278. #915 For use from C++, expat.h started requiring C++11 due to
  279. use of C99 features
  280. #919 #920 Version info bumped from 10:3:9 (libexpat*.so.1.9.3)
  281. to 11:0:10 (libexpat*.so.1.10.0); see https://verbump.de/
  282. for what these numbers do
  283. Infrastructure:
  284. #907 CI: Upgrade Clang from 18 to 19
  285. #913 CI: Drop macos-12 and add macos-15
  286. #910 CI: Adapt to breaking changes in GitHub Actions
  287. #898 Add missing entries to .gitignore
  288. Special thanks to:
  289. Hanno Böck
  290. José Eduardo Gutiérrez Conejo
  291. José Ricardo Cardona Quesada
  292. Release 2.6.3 Wed September 4 2024
  293. Security fixes:
  294. #887 #890 CVE-2024-45490 -- Calling function XML_ParseBuffer with
  295. len < 0 without noticing and then calling XML_GetBuffer
  296. will have XML_ParseBuffer fail to recognize the problem
  297. and XML_GetBuffer corrupt memory.
  298. With the fix, XML_ParseBuffer now complains with error
  299. XML_ERROR_INVALID_ARGUMENT just like sibling XML_Parse
  300. has been doing since Expat 2.2.1, and now documented.
  301. Impact is denial of service to potentially artitrary code
  302. execution.
  303. #888 #891 CVE-2024-45491 -- Internal function dtdCopy can have an
  304. integer overflow for nDefaultAtts on 32-bit platforms
  305. (where UINT_MAX equals SIZE_MAX).
  306. Impact is denial of service to potentially artitrary code
  307. execution.
  308. #889 #892 CVE-2024-45492 -- Internal function nextScaffoldPart can
  309. have an integer overflow for m_groupSize on 32-bit
  310. platforms (where UINT_MAX equals SIZE_MAX).
  311. Impact is denial of service to potentially artitrary code
  312. execution.
  313. Other changes:
  314. #851 #879 Autotools: Sync CMake templates with CMake 3.28
  315. #853 Autotools: Always provide path to find(1) for portability
  316. #861 Autotools: Ensure that the m4 directory always exists.
  317. #870 Autotools: Simplify handling of SIZEOF_VOID_P
  318. #869 Autotools: Support non-GNU sed
  319. #856 Autotools|CMake: Fix main() to main(void)
  320. #865 Autotools|CMake: Fix compile tests for HAVE_SYSCALL_GETRANDOM
  321. #863 Autotools|CMake: Stop requiring dos2unix
  322. #854 #855 CMake: Fix check for symbols size_t and off_t
  323. #864 docs|tests: Convert README to Markdown and update
  324. #741 Windows: Drop support for Visual Studio <=15.0/2017
  325. #886 Drop needless XML_DTD guards around is_param access
  326. #885 Fix typo in a code comment
  327. #894 #896 Version info bumped from 10:2:9 (libexpat*.so.1.9.2)
  328. to 10:3:9 (libexpat*.so.1.9.3); see https://verbump.de/
  329. for what these numbers do
  330. Infrastructure:
  331. #880 Readme: Promote the call for help
  332. #868 CI: Fix various issues
  333. #849 CI: Allow triggering GitHub Actions workflows manually
  334. #851 #872 ..
  335. #873 #879 CI: Adapt to breaking changes in GitHub Actions
  336. Special thanks to:
  337. Alexander Bluhm
  338. Berkay Eren Ürün
  339. Dag-Erling Smørgrav
  340. Ferenc Géczi
  341. TaiYou
  342. Release 2.6.2 Wed March 13 2024
  343. Security fixes:
  344. #839 #842 CVE-2024-28757 -- Prevent billion laughs attacks with
  345. isolated use of external parsers. Please see the commit
  346. message of commit 1d50b80cf31de87750103656f6eb693746854aa8
  347. for details.
  348. Bug fixes:
  349. #839 #841 Reject direct parameter entity recursion
  350. and avoid the related undefined behavior
  351. Other changes:
  352. #847 Autotools: Fix build for DOCBOOK_TO_MAN containing spaces
  353. #837 Add missing #821 and #824 to 2.6.1 change log
  354. #838 #843 Version info bumped from 10:1:9 (libexpat*.so.1.9.1)
  355. to 10:2:9 (libexpat*.so.1.9.2); see https://verbump.de/
  356. for what these numbers do
  357. Special thanks to:
  358. Philippe Antoine
  359. Tomas Korbar
  360. and
  361. Clang UndefinedBehaviorSanitizer
  362. OSS-Fuzz / ClusterFuzz
  363. Release 2.6.1 Thu February 29 2024
  364. Bug fixes:
  365. #817 Make tests independent of CPU speed, and thus more robust
  366. #828 #836 Expose billion laughs API with XML_DTD defined and
  367. XML_GE undefined, regression from 2.6.0
  368. Other changes:
  369. #829 Hide test-only code behind new internal macro
  370. #833 Autotools: Reject expat_config.h.in defining SIZEOF_VOID_P
  371. #821 #824 Autotools: Fix "make clean" for case:
  372. ./configure --without-docbook && make clean all
  373. #819 Address compiler warnings
  374. #832 #834 Version info bumped from 10:0:9 (libexpat*.so.1.9.0)
  375. to 10:1:9 (libexpat*.so.1.9.1); see https://verbump.de/
  376. for what these numbers do
  377. Infrastructure:
  378. #818 CI: Adapt to breaking changes in clang-format
  379. Special thanks to:
  380. David Hall
  381. Snild Dolkow
  382. Release 2.6.0 Tue February 6 2024
  383. Security fixes:
  384. #789 #814 CVE-2023-52425 -- Fix quadratic runtime issues with big tokens
  385. that can cause denial of service, in partial where
  386. dealing with compressed XML input. Applications
  387. that parsed a document in one go -- a single call to
  388. functions XML_Parse or XML_ParseBuffer -- were not affected.
  389. The smaller the chunks/buffers you use for parsing
  390. previously, the bigger the problem prior to the fix.
  391. Backporters should be careful to no omit parts of
  392. pull request #789 and to include earlier pull request #771,
  393. in order to not break the fix.
  394. #777 CVE-2023-52426 -- Fix billion laughs attacks for users
  395. compiling *without* XML_DTD defined (which is not common).
  396. Users with XML_DTD defined have been protected since
  397. Expat >=2.4.0 (and that was CVE-2013-0340 back then).
  398. Bug fixes:
  399. #753 Fix parse-size-dependent "invalid token" error for
  400. external entities that start with a byte order mark
  401. #780 Fix NULL pointer dereference in setContext via
  402. XML_ExternalEntityParserCreate for compilation with
  403. XML_DTD undefined
  404. #812 #813 Protect against closing entities out of order
  405. Other changes:
  406. #723 Improve support for arc4random/arc4random_buf
  407. #771 #788 Improve buffer growth in XML_GetBuffer and XML_Parse
  408. #761 #770 xmlwf: Support --help and --version
  409. #759 #770 xmlwf: Support custom buffer size for XML_GetBuffer and read
  410. #744 xmlwf: Improve language and URL clickability in help output
  411. #673 examples: Add new example "element_declarations.c"
  412. #764 Be stricter about macro XML_CONTEXT_BYTES at build time
  413. #765 Make inclusion to expat_config.h consistent
  414. #726 #727 Autotools: configure.ac: Support --disable-maintainer-mode
  415. #678 #705 ..
  416. #706 #733 #792 Autotools: Sync CMake templates with CMake 3.26
  417. #795 Autotools: Make installation of shipped man page doc/xmlwf.1
  418. independent of docbook2man availability
  419. #815 Autotools|CMake: Add missing -DXML_STATIC to pkg-config file
  420. section "Cflags.private" in order to fix compilation
  421. against static libexpat using pkg-config on Windows
  422. #724 #751 Autotools|CMake: Require a C99 compiler
  423. (a de-facto requirement already since Expat 2.2.2 of 2017)
  424. #793 Autotools|CMake: Fix PACKAGE_BUGREPORT variable
  425. #750 #786 Autotools|CMake: Make test suite require a C++11 compiler
  426. #749 CMake: Require CMake >=3.5.0
  427. #672 CMake: Lowercase off_t and size_t to help a bug in Meson
  428. #746 CMake: Sort xmlwf sources alphabetically
  429. #785 CMake|Windows: Fix generation of DLL file version info
  430. #790 CMake: Build tests/benchmark/benchmark.c as well for
  431. a build with -DEXPAT_BUILD_TESTS=ON
  432. #745 #757 docs: Document the importance of isFinal + adjust tests
  433. accordingly
  434. #736 docs: Improve use of "NULL" and "null"
  435. #713 docs: Be specific about version of XML (XML 1.0r4)
  436. and version of C (C99); (XML 1.0r5 will need a sponsor.)
  437. #762 docs: reference.html: Promote function XML_ParseBuffer more
  438. #779 docs: reference.html: Add HTML anchors to XML_* macros
  439. #760 docs: reference.html: Upgrade to OK.css 1.2.0
  440. #763 #739 docs: Fix typos
  441. #696 docs|CI: Use HTTPS URLs instead of HTTP at various places
  442. #669 #670 ..
  443. #692 #703 ..
  444. #733 #772 Address compiler warnings
  445. #798 #800 Address clang-tidy warnings
  446. #775 #776 Version info bumped from 9:10:8 (libexpat*.so.1.8.10)
  447. to 10:0:9 (libexpat*.so.1.9.0); see https://verbump.de/
  448. for what these numbers do
  449. Infrastructure:
  450. #700 #701 docs: Document security policy in file SECURITY.md
  451. #766 docs: Improve parse buffer variables in-code documentation
  452. #674 #738 ..
  453. #740 #747 ..
  454. #748 #781 #782 Refactor coverage and conformance tests
  455. #714 #716 Refactor debug level variables to unsigned long
  456. #671 Improve handling of empty environment variable value
  457. in function getDebugLevel (without visible user effect)
  458. #755 #774 ..
  459. #758 #783 ..
  460. #784 #787 tests: Improve test coverage with regard to parse chunk size
  461. #660 #797 #801 Fuzzing: Improve fuzzing coverage
  462. #367 #799 Fuzzing|CI: Start running OSS-Fuzz fuzzing regression tests
  463. #698 #721 CI: Resolve some Travis CI leftovers
  464. #669 CI: Be robust towards absence of Git tags
  465. #693 #694 CI: Set permissions to "contents: read" for security
  466. #709 CI: Pin all GitHub Actions to specific commits for security
  467. #739 CI: Reject spelling errors using codespell
  468. #798 CI: Enforce clang-tidy clean code
  469. #773 #808 ..
  470. #809 #810 CI: Upgrade Clang from 15 to 18
  471. #796 CI: Start using Clang's Control Flow Integrity sanitizer
  472. #675 #720 #722 CI: Adapt to breaking changes in GitHub Actions Ubuntu images
  473. #689 CI: Adapt to breaking changes in Clang/LLVM Debian packaging
  474. #763 CI: Adapt to breaking changes in codespell
  475. #803 CI: Adapt to breaking changes in Cppcheck
  476. Special thanks to:
  477. Ivan Galkin
  478. Joyce Brum
  479. Philippe Antoine
  480. Rhodri James
  481. Snild Dolkow
  482. spookyahell
  483. Steven Garske
  484. and
  485. Clang AddressSanitizer
  486. Clang UndefinedBehaviorSanitizer
  487. codespell
  488. GCC Farm Project
  489. OSS-Fuzz
  490. Sony Mobile
  491. Release 2.5.0 Tue October 25 2022
  492. Security fixes:
  493. #616 #649 #650 CVE-2022-43680 -- Fix heap use-after-free after overeager
  494. destruction of a shared DTD in function
  495. XML_ExternalEntityParserCreate in out-of-memory situations.
  496. Expected impact is denial of service or potentially
  497. arbitrary code execution.
  498. Bug fixes:
  499. #612 #645 Fix corruption from undefined entities
  500. #613 #654 Fix case when parsing was suspended while processing nested
  501. entities
  502. #616 #652 #653 Stop leaking opening tag bindings after a closing tag
  503. mismatch error where a parser is reset through
  504. XML_ParserReset and then reused to parse
  505. #656 CMake: Fix generation of pkg-config file
  506. #658 MinGW|CMake: Fix static library name
  507. Other changes:
  508. #663 Protect header expat_config.h from multiple inclusion
  509. #666 examples: Make use of XML_GetBuffer and be more
  510. consistent across examples
  511. #648 Address compiler warnings
  512. #667 #668 Version info bumped from 9:9:8 to 9:10:8;
  513. see https://verbump.de/ for what these numbers do
  514. Special thanks to:
  515. Jann Horn
  516. Mark Brand
  517. Osyotr
  518. Rhodri James
  519. and
  520. Google Project Zero
  521. Release 2.4.9 Tue September 20 2022
  522. Security fixes:
  523. #629 #640 CVE-2022-40674 -- Heap use-after-free vulnerability in
  524. function doContent. Expected impact is denial of service
  525. or potentially arbitrary code execution.
  526. Bug fixes:
  527. #634 MinGW: Fix mis-compilation for -D__USE_MINGW_ANSI_STDIO=0
  528. #614 docs: Fix documentation on effect of switch XML_DTD on
  529. symbol visibility in doc/reference.html
  530. Other changes:
  531. #638 MinGW: Make fix-xmltest-log.sh drop more Wine bug output
  532. #596 #625 Autotools: Sync CMake templates with CMake 3.22
  533. #608 CMake: Migrate from use of CMAKE_*_POSTFIX to
  534. dedicated variables EXPAT_*_POSTFIX to stop affecting
  535. other projects
  536. #597 #599 Windows|CMake: Add missing -DXML_STATIC to test runners
  537. and fuzzers
  538. #512 #621 Windows|CMake: Render .def file from a template to fix
  539. linking with -DEXPAT_DTD=OFF and/or -DEXPAT_ATTR_INFO=ON
  540. #611 #621 MinGW|CMake: Apply MSVC .def file when linking
  541. #622 #624 MinGW|CMake: Sync library name with GNU Autotools,
  542. i.e. produce libexpat-1.dll rather than libexpat.dll
  543. by default. Filename libexpat.dll.a is unaffected.
  544. #632 MinGW|CMake: Set missing variable CMAKE_RC_COMPILER in
  545. toolchain file "cmake/mingw-toolchain.cmake" to avoid
  546. error "windres: Command not found" on e.g. Ubuntu 20.04
  547. #597 #627 CMake: Unify inconsistent use of set() and option() in
  548. context of public build time options to take need for
  549. set(.. FORCE) in projects using Expat by means of
  550. add_subdirectory(..) off Expat's users' shoulders
  551. #626 #641 Stop exporting API symbols when building a static library
  552. #644 Resolve use of deprecated "fgrep" by "grep -F"
  553. #620 CMake: Make documentation on variables a bit more consistent
  554. #636 CMake: Drop leading whitespace from a #cmakedefine line in
  555. file expat_config.h.cmake
  556. #594 xmlwf: Fix harmless variable mix-up in function nsattcmp
  557. #592 #593 #610 Address Cppcheck warnings
  558. #643 Address Clang 15 compiler warnings
  559. #642 #644 Version info bumped from 9:8:8 to 9:9:8;
  560. see https://verbump.de/ for what these numbers do
  561. Infrastructure:
  562. #597 #598 CI: Windows: Start covering MSVC 2022
  563. #619 CI: macOS: Migrate off deprecated macOS 10.15
  564. #632 CI: Linux: Make migration off deprecated Ubuntu 18.04 work
  565. #643 CI: Upgrade Clang from 14 to 15
  566. #637 apply-clang-format.sh: Add support for BSD find
  567. #633 coverage.sh: Exclude MinGW headers
  568. #635 coverage.sh: Fix name collision for -funsigned-char
  569. Special thanks to:
  570. David Faure
  571. Felix Wilhelm
  572. Frank Bergmann
  573. Rhodri James
  574. Rosen Penev
  575. Thijs Schreijer
  576. Vincent Torri
  577. and
  578. Google Project Zero
  579. Release 2.4.8 Mon March 28 2022
  580. Other changes:
  581. #587 pkg-config: Move "-lm" to section "Libs.private"
  582. #587 CMake|MSVC: Fix pkg-config section "Libs"
  583. #55 #582 CMake|macOS: Start using linker arguments
  584. "-compatibility_version <version>" and
  585. "-current_version <version>" in a way compatible with
  586. GNU Libtool
  587. #590 #591 Version info bumped from 9:7:8 to 9:8:8;
  588. see https://verbump.de/ for what these numbers do
  589. Infrastructure:
  590. #589 CI: Upgrade Clang from 13 to 14
  591. Special thanks to:
  592. evpobr
  593. Kai Pastor
  594. Sam James
  595. Release 2.4.7 Fri March 4 2022
  596. Bug fixes:
  597. #572 #577 Relax fix to CVE-2022-25236 (introduced with release 2.4.5)
  598. with regard to all valid URI characters (RFC 3986),
  599. i.e. the following set (excluding whitespace):
  600. ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz
  601. 0123456789 % -._~ :/?#[]@ !$&'()*+,;=
  602. Other changes:
  603. #555 #570 #581 CMake|Windows: Store Expat version in the DLL
  604. #577 Document consequences of namespace separator choices not just
  605. in doc/reference.html but also in header <expat.h>
  606. #577 Document Expat's lack of validation of namespace URIs against
  607. RFC 3986, and that the XML 1.0r4 specification doesn't
  608. require Expat to validate namespace URIs, and that Expat
  609. may do more in that regard in future releases.
  610. If you find need for strict RFC 3986 URI validation on
  611. application level today, https://uriparser.github.io/ may
  612. be of interest.
  613. #579 Fix documentation of XML_EndDoctypeDeclHandler in <expat.h>
  614. #575 Document that a call to XML_FreeContentModel can be done at
  615. a later time from outside the element declaration handler
  616. #574 Make hardcoded namespace URIs easier to find in code
  617. #573 Update documentation on use of XML_POOR_ENTOPY on Solaris
  618. #569 #571 tests: Resolve use of macros NAN and INFINITY for GNU G++
  619. 4.8.2 on Solaris.
  620. #578 #580 Version info bumped from 9:6:8 to 9:7:8;
  621. see https://verbump.de/ for what these numbers do
  622. Special thanks to:
  623. Jeffrey Walton
  624. Johnny Jazeix
  625. Thijs Schreijer
  626. Release 2.4.6 Sun February 20 2022
  627. Bug fixes:
  628. #566 Fix a regression introduced by the fix for CVE-2022-25313
  629. in release 2.4.5 that affects applications that (1)
  630. call function XML_SetElementDeclHandler and (2) are
  631. parsing XML that contains nested element declarations
  632. (e.g. "<!ELEMENT junk ((bar|foo|xyz+), zebra*)>").
  633. Other changes:
  634. #567 #568 Version info bumped from 9:5:8 to 9:6:8;
  635. see https://verbump.de/ for what these numbers do
  636. Special thanks to:
  637. Matt Sergeant
  638. Samanta Navarro
  639. Sergei Trofimovich
  640. and
  641. NixOS
  642. Perl XML::Parser
  643. Release 2.4.5 Fri February 18 2022
  644. Security fixes:
  645. #562 CVE-2022-25235 -- Passing malformed 2- and 3-byte UTF-8
  646. sequences (e.g. from start tag names) to the XML
  647. processing application on top of Expat can cause
  648. arbitrary damage (e.g. code execution) depending
  649. on how invalid UTF-8 is handled inside the XML
  650. processor; validation was not their job but Expat's.
  651. Exploits with code execution are known to exist.
  652. #561 CVE-2022-25236 -- Passing (one or more) namespace separator
  653. characters in "xmlns[:prefix]" attribute values
  654. made Expat send malformed tag names to the XML
  655. processor on top of Expat which can cause
  656. arbitrary damage (e.g. code execution) depending
  657. on such unexpectable cases are handled inside the XML
  658. processor; validation was not their job but Expat's.
  659. Exploits with code execution are known to exist.
  660. #558 CVE-2022-25313 -- Fix stack exhaustion in doctype parsing
  661. that could be triggered by e.g. a 2 megabytes
  662. file with a large number of opening braces.
  663. Expected impact is denial of service or potentially
  664. arbitrary code execution.
  665. #560 CVE-2022-25314 -- Fix integer overflow in function copyString;
  666. only affects the encoding name parameter at parser creation
  667. time which is often hardcoded (rather than user input),
  668. takes a value in the gigabytes to trigger, and a 64-bit
  669. machine. Expected impact is denial of service.
  670. #559 CVE-2022-25315 -- Fix integer overflow in function storeRawNames;
  671. needs input in the gigabytes and a 64-bit machine.
  672. Expected impact is denial of service or potentially
  673. arbitrary code execution.
  674. Other changes:
  675. #557 #564 Version info bumped from 9:4:8 to 9:5:8;
  676. see https://verbump.de/ for what these numbers do
  677. Special thanks to:
  678. Ivan Fratric
  679. Samanta Navarro
  680. and
  681. Google Project Zero
  682. JetBrains
  683. Release 2.4.4 Sun January 30 2022
  684. Security fixes:
  685. #550 CVE-2022-23852 -- Fix signed integer overflow
  686. (undefined behavior) in function XML_GetBuffer
  687. (that is also called by function XML_Parse internally)
  688. for when XML_CONTEXT_BYTES is defined to >0 (which is both
  689. common and default).
  690. Impact is denial of service or more.
  691. #551 CVE-2022-23990 -- Fix unsigned integer overflow in function
  692. doProlog triggered by large content in element type
  693. declarations when there is an element declaration handler
  694. present (from a prior call to XML_SetElementDeclHandler).
  695. Impact is denial of service or more.
  696. Bug fixes:
  697. #544 #545 xmlwf: Fix a memory leak on output file opening error
  698. Other changes:
  699. #546 Autotools: Fix broken CMake support under Cygwin
  700. #554 Windows: Add missing files to the installer to fix
  701. compilation with CMake from installed sources
  702. #552 #554 Version info bumped from 9:3:8 to 9:4:8;
  703. see https://verbump.de/ for what these numbers do
  704. Special thanks to:
  705. Carlo Bramini
  706. hwt0415
  707. Roland Illig
  708. Samanta Navarro
  709. and
  710. Clang LeakSan and the Clang team
  711. Release 2.4.3 Sun January 16 2022
  712. Security fixes:
  713. #531 #534 CVE-2021-45960 -- Fix issues with left shifts by >=29 places
  714. resulting in
  715. a) realloc acting as free
  716. b) realloc allocating too few bytes
  717. c) undefined behavior
  718. depending on architecture and precise value
  719. for XML documents with >=2^27+1 prefixed attributes
  720. on a single XML tag a la
  721. "<r xmlns:a='[..]' a:a123='[..]' [..] />"
  722. where XML_ParserCreateNS is used to create the parser
  723. (which needs argument "-n" when running xmlwf).
  724. Impact is denial of service, or more.
  725. #532 #538 CVE-2021-46143 (ZDI-CAN-16157) -- Fix integer overflow
  726. on variable m_groupSize in function doProlog leading
  727. to realloc acting as free.
  728. Impact is denial of service or more.
  729. #539 CVE-2022-22822 to CVE-2022-22827 -- Prevent integer overflows
  730. near memory allocation at multiple places. Mitre assigned
  731. a dedicated CVE for each involved internal C function:
  732. - CVE-2022-22822 for function addBinding
  733. - CVE-2022-22823 for function build_model
  734. - CVE-2022-22824 for function defineAttribute
  735. - CVE-2022-22825 for function lookup
  736. - CVE-2022-22826 for function nextScaffoldPart
  737. - CVE-2022-22827 for function storeAtts
  738. Impact is denial of service or more.
  739. Other changes:
  740. #535 CMake: Make call to file(GENERATE [..]) work for CMake <3.19
  741. #541 Autotools|CMake: MinGW: Make run.sh(.in) work for Cygwin
  742. and MSYS2 by not going through Wine on these platforms
  743. #527 #528 Address compiler warnings
  744. #533 #543 Version info bumped from 9:2:8 to 9:3:8;
  745. see https://verbump.de/ for what these numbers do
  746. Infrastructure:
  747. #536 CI: Check for realistic minimum CMake version
  748. #529 #539 CI: Cover compilation with -m32
  749. #529 CI: Store coverage reports as artifacts for download
  750. #528 CI: Upgrade Clang from 11 to 13
  751. Special thanks to:
  752. An anonymous whitehat
  753. Christopher Degawa
  754. J. Peter Mugaas
  755. Tyson Smith
  756. and
  757. GCC Farm Project
  758. Trend Micro Zero Day Initiative
  759. Release 2.4.2 Sun December 19 2021
  760. Other changes:
  761. #509 #510 Link againgst libm for function "isnan"
  762. #513 #514 Include expat_config.h as early as possible
  763. #498 Autotools: Include files with release archives:
  764. - buildconf.sh
  765. - fuzz/*.c
  766. #507 #519 Autotools: Sync CMake templates with CMake 3.20
  767. #495 #524 CMake: MinGW: Fix pkg-config section "Libs" for
  768. - non-release build types (e.g. -DCMAKE_BUILD_TYPE=Debug)
  769. - multi-config CMake generators (e.g. Ninja Multi-Config)
  770. #502 #503 docs: Document that function XML_GetBuffer may return NULL
  771. when asking for a buffer of 0 (zero) bytes size
  772. #522 #523 docs: Fix return value docs for both
  773. XML_SetBillionLaughsAttackProtection* functions
  774. #525 #526 Version info bumped from 9:1:8 to 9:2:8;
  775. see https://verbump.de/ for what these numbers do
  776. Special thanks to:
  777. Donghee Na
  778. Joergen Ibsen
  779. Kai Pastor
  780. Release 2.4.1 Sun May 23 2021
  781. Bug fixes:
  782. #488 #490 Autotools: Fix installed header expat_config.h for multilib
  783. systems; regression introduced in 2.4.0 by pull request #486
  784. Other changes:
  785. #491 #492 Version info bumped from 9:0:8 to 9:1:8;
  786. see https://verbump.de/ for what these numbers do
  787. Special thanks to:
  788. Gentoo's QA check "multilib_check_headers"
  789. Release 2.4.0 Sun May 23 2021
  790. Security fixes:
  791. #34 #466 #484 CVE-2013-0340/CWE-776 -- Protect against billion laughs attacks
  792. (denial-of-service; flavors targeting CPU time or RAM or both,
  793. leveraging general entities or parameter entities or both)
  794. by tracking and limiting the input amplification factor
  795. (<amplification> := (<direct> + <indirect>) / <direct>).
  796. By conservative default, amplification up to a factor of 100.0
  797. is tolerated and rejection only starts after 8 MiB of output bytes
  798. (=<direct> + <indirect>) have been processed.
  799. The fix adds the following to the API:
  800. - A new error code XML_ERROR_AMPLIFICATION_LIMIT_BREACH to
  801. signals this specific condition.
  802. - Two new API functions ..
  803. - XML_SetBillionLaughsAttackProtectionMaximumAmplification and
  804. - XML_SetBillionLaughsAttackProtectionActivationThreshold
  805. .. to further tighten billion laughs protection parameters
  806. when desired. Please see file "doc/reference.html" for details.
  807. If you ever need to increase the defaults for non-attack XML
  808. payload, please file a bug report with libexpat.
  809. - Two new XML_FEATURE_* constants ..
  810. - that can be queried using the XML_GetFeatureList function, and
  811. - that are shown in "xmlwf -v" output.
  812. - Two new environment variable switches ..
  813. - EXPAT_ACCOUNTING_DEBUG=(0|1|2|3) and
  814. - EXPAT_ENTITY_DEBUG=(0|1)
  815. .. for runtime debugging of accounting and entity processing.
  816. Specific behavior of these values may change in the future.
  817. - Two new command line arguments "-a FACTOR" and "-b BYTES"
  818. for xmlwf to further tighten billion laughs protection
  819. parameters when desired.
  820. If you ever need to increase the defaults for non-attack XML
  821. payload, please file a bug report with libexpat.
  822. Bug fixes:
  823. #332 #470 For (non-default) compilation with -DEXPAT_MIN_SIZE=ON (CMake)
  824. or CPPFLAGS=-DXML_MIN_SIZE (GNU Autotools): Fix segfault
  825. for UTF-16 payloads containing CDATA sections.
  826. #485 #486 Autotools: Fix generated CMake files for non-64bit and
  827. non-Linux platforms (e.g. macOS and MinGW in particular)
  828. that were introduced with release 2.3.0
  829. Other changes:
  830. #468 #469 xmlwf: Improve help output and the xmlwf man page
  831. #463 xmlwf: Improve maintainability through some refactoring
  832. #477 xmlwf: Fix man page DocBook validity
  833. #456 Autotools: Sync CMake templates with CMake 3.18
  834. #458 #459 CMake: Support absolute paths for both CMAKE_INSTALL_LIBDIR
  835. and CMAKE_INSTALL_INCLUDEDIR
  836. #471 #481 CMake: Add support for standard variable BUILD_SHARED_LIBS
  837. #457 Unexpose symbol _INTERNAL_trim_to_complete_utf8_characters
  838. #467 Resolve macro HAVE_EXPAT_CONFIG_H
  839. #472 Delete unused legacy helper file "conftools/PrintPath"
  840. #473 #483 Improve attribution
  841. #464 #465 #477 doc/reference.html: Fix XHTML validity
  842. #475 #478 doc/reference.html: Replace the 90s look by OK.css
  843. #479 Version info bumped from 8:0:7 to 9:0:8
  844. due to addition of new symbols and error codes;
  845. see https://verbump.de/ for what these numbers do
  846. Infrastructure:
  847. #456 CI: Enable periodic runs
  848. #457 CI: Start covering the list of exported symbols
  849. #474 CI: Isolate coverage task
  850. #476 #482 CI: Adapt to breaking changes in image "ubuntu-18.04"
  851. #477 CI: Cover well-formedness and DocBook/XHTML validity
  852. of doc/reference.html and doc/xmlwf.xml
  853. Special thanks to:
  854. Dimitry Andric
  855. Eero Helenius
  856. Nick Wellnhofer
  857. Rhodri James
  858. Tomas Korbar
  859. Yury Gribov
  860. and
  861. Clang LeakSan
  862. JetBrains
  863. OSS-Fuzz
  864. Release 2.3.0 Thu March 25 2021
  865. Bug fixes:
  866. #438 When calling XML_ParseBuffer without a prior successful call to
  867. XML_GetBuffer as a user, no longer trigger undefined behavior
  868. (by adding an integer to a NULL pointer) but rather return
  869. XML_STATUS_ERROR and set the error code to (new) code
  870. XML_ERROR_NO_BUFFER. Found by UBSan (UndefinedBehaviorSanitizer)
  871. of Clang 11 (but not Clang 9).
  872. #444 xmlwf: Exit status 2 was used for both:
  873. - malformed input files (documented) and
  874. - invalid command-line arguments (undocumented).
  875. The case of invalid command-line arguments now
  876. has its own exit status 4, resolving the ambiguity.
  877. Other changes:
  878. #439 xmlwf: Add argument -k to allow continuing after
  879. non-fatal errors
  880. #439 xmlwf: Add section about exit status to the -h help output
  881. #422 #426 #447 Windows: Drop support for Visual Studio <=14.0/2015
  882. #434 Windows: CMake: Detect unsupported Visual Studio at
  883. configure time (rather than at compile time)
  884. #382 #428 testrunner: Make verbose mode (argument "-v") report
  885. about passed tests, and make default mode report about
  886. failures, as well.
  887. #442 CMake: Call "enable_language(CXX)" prior to tinkering
  888. with CMAKE_CXX_* variables
  889. #448 Document use of libexpat from a CMake-based project
  890. #451 Autotools: Install CMake files as generated by CMake 3.19.6
  891. so that users with "find_package(expat [..] CONFIG [..])"
  892. are served on distributions that are *not* using the CMake
  893. build system inside for libexpat packaging
  894. #436 #437 Autotools: Drop obsolescent macro AC_HEADER_STDC
  895. #450 #452 Autotools: Resolve use of obsolete macro AC_CONFIG_HEADER
  896. #441 Address compiler warnings
  897. #443 Version info bumped from 7:12:6 to 8:0:7
  898. due to addition of error code XML_ERROR_NO_BUFFER
  899. (see https://verbump.de/ for what these numbers do)
  900. Infrastructure:
  901. #435 #446 Replace Travis CI by GitHub Actions
  902. Special thanks to:
  903. Alexander Richardson
  904. Oleksandr Popovych
  905. Thomas Beutlich
  906. Tim Bray
  907. and
  908. Clang LeakSan, Clang 11 UBSan and the Clang team
  909. Release 2.2.10 Sat October 3 2020
  910. Bug fixes:
  911. #390 #395 #398 Fix undefined behavior during parsing caused by
  912. pointer arithmetic with NULL pointers
  913. #404 #405 Fix reading uninitialized variable during parsing
  914. #406 xmlwf: Add missing check for malloc NULL return
  915. Other changes:
  916. #396 Windows: Drop support for Visual Studio <=8.0/2005
  917. #409 Windows: Add missing file "Changes" to the installer
  918. to fix compilation with CMake from installed sources
  919. #403 xmlwf: Document exit codes in xmlwf manpage and
  920. exit with code 3 (rather than code 1) for output errors
  921. when used with "-d DIRECTORY"
  922. #356 #359 MinGW: Provide declaration of rand_s for mingwrt <5.3.0
  923. #383 #392 Autotools: Use -Werror while configure tests the compiler
  924. for supported compile flags to avoid false positives
  925. #383 #393 #394 Autotools: Improve handling of user (C|CPP|CXX|LD)FLAGS,
  926. e.g. ensure that they have the last word over flags added
  927. while running ./configure
  928. #360 CMake: Create libexpatw.{dll,so} and expatw.pc (with emphasis
  929. on suffix "w") with -DEXPAT_CHAR_TYPE=(ushort|wchar_t)
  930. #360 CMake: Detect and deny unsupported build combinations
  931. involving -DEXPAT_CHAR_TYPE=(ushort|wchar_t)
  932. #360 CMake: Install pre-compiled shipped xmlwf.1 manpage in case
  933. of -DEXPAT_BUILD_DOCS=OFF
  934. #375 #380 #419 CMake: Fix use of Expat by means of add_subdirectory
  935. #407 #408 CMake: Keep expat target name constant at "expat"
  936. (i.e. refrain from using the target name to control
  937. build artifact filenames)
  938. #385 CMake: Fix compilation with -DEXPAT_SHARED_LIBS=OFF for
  939. Windows
  940. CMake: Expose man page compilation as target "xmlwf-manpage"
  941. #413 #414 CMake: Introduce option EXPAT_BUILD_PKGCONFIG
  942. to control generation of pkg-config file "expat.pc"
  943. #424 CMake: Add minimalistic support for building binary packages
  944. with CMake target "package"; based on CPack
  945. #366 CMake: Add option -DEXPAT_OSSFUZZ_BUILD=(ON|OFF) with
  946. default OFF to build fuzzer code against OSS-Fuzz and
  947. related environment variable LIB_FUZZING_ENGINE
  948. #354 Fix testsuite for -DEXPAT_DTD=OFF and -DEXPAT_NS=OFF, each
  949. #354 #355 ..
  950. #356 #412 Address compiler warnings
  951. #368 #369 Address pngcheck warnings with doc/*.png images
  952. #425 Version info bumped from 7:11:6 to 7:12:6
  953. Special thanks to:
  954. asavah
  955. Ben Wagner
  956. Bhargava Shastry
  957. Frank Landgraf
  958. Jeffrey Walton
  959. Joe Orton
  960. Kleber Tarcísio
  961. Ma Lin
  962. Maciej Sroczyński
  963. Mohammed Khajapasha
  964. Vadim Zeitlin
  965. and
  966. Cppcheck 2.0 and the Cppcheck team
  967. Release 2.2.9 Wed September 25 2019
  968. Other changes:
  969. examples: Drop executable bits from elements.c
  970. #349 Windows: Change the name of the Windows DLLs from expat*.dll
  971. to libexpat*.dll once more (regression from 2.2.8, first
  972. fixed in 1.95.3, issue #61 on SourceForge today,
  973. was issue #432456 back then); needs a fix due
  974. case-insensitive file systems on Windows and the fact that
  975. Perl's XML::Parser::Expat compiles into Expat.dll.
  976. #347 Windows: Only define _CRT_RAND_S if not defined
  977. Version info bumped from 7:10:6 to 7:11:6
  978. Special thanks to:
  979. Ben Wagner
  980. Release 2.2.8 Fri September 13 2019
  981. Security fixes:
  982. #317 #318 CVE-2019-15903 -- Fix heap overflow triggered by
  983. XML_GetCurrentLineNumber (or XML_GetCurrentColumnNumber),
  984. and deny internal entities closing the doctype;
  985. fixed in commit c20b758c332d9a13afbbb276d30db1d183a85d43
  986. Bug fixes:
  987. #240 Fix cases where XML_StopParser did not have any effect
  988. when called from inside of an end element handler
  989. #341 xmlwf: Fix exit code for operation without "-d DIRECTORY";
  990. previously, only "-d DIRECTORY" would give you a proper
  991. exit code:
  992. # xmlwf -d . <<<'<not well-formed>' 2>/dev/null ; echo $?
  993. 2
  994. # xmlwf <<<'<not well-formed>' 2>/dev/null ; echo $?
  995. 0
  996. Now both cases return exit code 2.
  997. Other changes:
  998. #299 #302 Windows: Replace LoadLibrary hack to access
  999. unofficial API function SystemFunction036 (RtlGenRandom)
  1000. by using official API function rand_s (needs WinXP+)
  1001. #325 Windows: Drop support for Visual Studio <=7.1/2003
  1002. and document supported compilers in README.md
  1003. #286 Windows: Remove COM code from xmlwf; in case it turns
  1004. out needed later, there will be a dedicated repository
  1005. below https://github.com/libexpat/ for that code
  1006. #322 Windows: Remove explicit MSVC solution and project files.
  1007. You can generate Visual Studio solution files through
  1008. CMake, e.g.: cmake -G"Visual Studio 15 2017" .
  1009. #338 xmlwf: Make "xmlwf -h" help output more friendly
  1010. #339 examples: Improve elements.c
  1011. #244 #264 Autotools: Add argument --enable-xml-attr-info
  1012. #239 #301 Autotools: Add arguments
  1013. --with-getrandom
  1014. --without-getrandom
  1015. --with-sys-getrandom
  1016. --without-sys-getrandom
  1017. #312 #343 Autotools: Fix linking issues with "./configure LD=clang"
  1018. Autotools: Fix "make run-xmltest" for out-of-source builds
  1019. #329 #336 CMake: Pull all options from Expat <=2.2.7 into namespace
  1020. prefix EXPAT_ with the exception of DOCBOOK_TO_MAN:
  1021. - BUILD_doc -> EXPAT_BUILD_DOCS (plural)
  1022. - BUILD_examples -> EXPAT_BUILD_EXAMPLES
  1023. - BUILD_shared -> EXPAT_SHARED_LIBS
  1024. - BUILD_tests -> EXPAT_BUILD_TESTS
  1025. - BUILD_tools -> EXPAT_BUILD_TOOLS
  1026. - DOCBOOK_TO_MAN -> DOCBOOK_TO_MAN (unchanged)
  1027. - INSTALL -> EXPAT_ENABLE_INSTALL
  1028. - MSVC_USE_STATIC_CRT -> EXPAT_MSVC_STATIC_CRT
  1029. - USE_libbsd -> EXPAT_WITH_LIBBSD
  1030. - WARNINGS_AS_ERRORS -> EXPAT_WARNINGS_AS_ERRORS
  1031. - XML_CONTEXT_BYTES -> EXPAT_CONTEXT_BYTES
  1032. - XML_DEV_URANDOM -> EXPAT_DEV_URANDOM
  1033. - XML_DTD -> EXPAT_DTD
  1034. - XML_NS -> EXPAT_NS
  1035. - XML_UNICODE -> EXPAT_CHAR_TYPE=ushort (!)
  1036. - XML_UNICODE_WCHAR_T -> EXPAT_CHAR_TYPE=wchar_t (!)
  1037. #244 #264 CMake: Add argument -DEXPAT_ATTR_INFO=(ON|OFF),
  1038. default OFF
  1039. #326 CMake: Add argument -DEXPAT_LARGE_SIZE=(ON|OFF),
  1040. default OFF
  1041. #328 CMake: Add argument -DEXPAT_MIN_SIZE=(ON|OFF),
  1042. default OFF
  1043. #239 #277 CMake: Add arguments
  1044. -DEXPAT_WITH_GETRANDOM=(ON|OFF|AUTO), default AUTO
  1045. -DEXPAT_WITH_SYS_GETRANDOM=(ON|OFF|AUTO), default AUTO
  1046. #326 CMake: Install expat_config.h to include directory
  1047. #326 CMake: Generate and install configuration files for
  1048. future find_package(expat [..] CONFIG [..])
  1049. CMake: Now produces a summary of applied configuration
  1050. CMake: Require C++ compiler only when tests are enabled
  1051. #330 CMake: Fix compilation for 16bit character types,
  1052. i.e. ex -DXML_UNICODE=ON (and ex -DXML_UNICODE_WCHAR_T=ON)
  1053. #265 CMake: Fix linking with MinGW
  1054. #330 CMake: Add full support for MinGW; to enable, use
  1055. -DCMAKE_TOOLCHAIN_FILE=[expat]/cmake/mingw-toolchain.cmake
  1056. #330 CMake: Port "make run-xmltest" from GNU Autotools to CMake
  1057. #316 CMake: Windows: Make binary postfix match MSVC
  1058. Old: expat[d].lib
  1059. New: expat[w][d][MD|MT].lib
  1060. CMake: Migrate files from Windows to Unix line endings
  1061. #308 CMake: Integrate OSS-Fuzz fuzzers, option
  1062. -DEXPAT_BUILD_FUZZERS=(ON|OFF), default OFF
  1063. #14 Drop an OpenVMS support leftover
  1064. #235 #268 ..
  1065. #270 #310 ..
  1066. #313 #331 #333 Address compiler warnings
  1067. #282 #283 ..
  1068. #284 #285 Address cppcheck warnings
  1069. #294 #295 Address Clang Static Analyzer warnings
  1070. #24 #293 Mass-apply clang-format 9 (and ensure conformance during CI)
  1071. Version info bumped from 7:9:6 to 7:10:6
  1072. Special thanks to:
  1073. David Loffredo
  1074. Joonun Jang
  1075. Kishore Kunche
  1076. Marco Maggi
  1077. Mitch Phillips
  1078. Mohammed Khajapasha
  1079. Rolf Ade
  1080. xantares
  1081. Zhongyuan Zhou
  1082. Release 2.2.7 Wed June 19 2019
  1083. Security fixes:
  1084. #186 #262 CVE-2018-20843 -- Fix extraction of namespace prefixes from
  1085. XML names; XML names with multiple colons could end up in
  1086. the wrong namespace, and take a high amount of RAM and CPU
  1087. resources while processing, opening the door to
  1088. use for denial-of-service attacks
  1089. Other changes:
  1090. #195 #197 Autotools/CMake: Utilize -fvisibility=hidden to stop
  1091. exporting non-API symbols
  1092. #227 Autotools: Add --without-examples and --without-tests
  1093. #228 Autotools: Modernize configure.ac
  1094. #245 #246 Autotools: Fix check for -fvisibility=hidden for Clang
  1095. #247 #248 Autotools: Fix compilation for lack of docbook2x-man
  1096. #236 #258 Autotools: Produce .tar.{gz,lz,xz} release archives
  1097. #212 CMake: Make libdir of pkgconfig expat.pc support multilib
  1098. #158 #263 CMake: Build man page in PROJECT_BINARY_DIR not _SOURCE_DIR
  1099. #219 Remove fallback to bcopy, assume that memmove(3) exists
  1100. #257 Use portable "/usr/bin/env bash" shebang (e.g. for OpenBSD)
  1101. #243 Windows: Fix syntax of .def module definition files
  1102. Version info bumped from 7:8:6 to 7:9:6
  1103. Special thanks to:
  1104. Benjamin Peterson
  1105. Caolán McNamara
  1106. Hanno Böck
  1107. KangLin
  1108. Kishore Kunche
  1109. Marco Maggi
  1110. Rhodri James
  1111. Sebastian Dröge
  1112. userwithuid
  1113. Yury Gribov
  1114. Release 2.2.6 Sun August 12 2018
  1115. Bug fixes:
  1116. #170 #206 Avoid doing arithmetic with NULL pointers in XML_GetBuffer
  1117. #204 #205 Fix 2.2.5 regression with suspend-resume while parsing
  1118. a document like '<root/>'
  1119. Other changes:
  1120. #165 #168 Autotools: Fix docbook-related configure syntax error
  1121. #166 Autotools: Avoid grep option `-q` for Solaris
  1122. #167 Autotools: Support
  1123. ./configure DOCBOOK_TO_MAN="xmlto man --skip-validation"
  1124. #159 #167 Autotools: Support DOCBOOK_TO_MAN command which produces
  1125. xmlwf.1 rather than XMLWF.1; also covers case insensitive
  1126. file systems
  1127. #181 Autotools: Drop -rpath option passed to libtool
  1128. #188 Autotools: Detect and deny SGML docbook2man as ours is XML
  1129. #188 Autotools/CMake: Support command db2x_docbook2man as well
  1130. #174 CMake: Introduce option WARNINGS_AS_ERRORS, defaults to OFF
  1131. #184 #185 CMake: Introduce option MSVC_USE_STATIC_CRT, defaults to OFF
  1132. #207 #208 CMake: Introduce option XML_UNICODE and XML_UNICODE_WCHAR_T,
  1133. both defaulting to OFF
  1134. #175 CMake: Prefer check_symbol_exists over check_function_exists
  1135. #176 CMake: Create the same pkg-config file as with GNU Autotools
  1136. #178 #179 CMake: Use GNUInstallDirs module to set proper defaults for
  1137. install directories
  1138. #208 CMake: Utilize expat_config.h.cmake for XML_DEV_URANDOM
  1139. #180 Windows: Fix compilation of test suite for Visual Studio 2008
  1140. #131 #173 #202 Address compiler warnings
  1141. #187 #190 #200 Fix miscellaneous typos
  1142. Version info bumped from 7:7:6 to 7:8:6
  1143. Special thanks to:
  1144. Anton Maklakov
  1145. Benjamin Peterson
  1146. Brad King
  1147. Franek Korta
  1148. Frank Rast
  1149. Joe Orton
  1150. luzpaz
  1151. Pedro Vicente
  1152. Rainer Jung
  1153. Rhodri James
  1154. Rolf Ade
  1155. Rolf Eike Beer
  1156. Thomas Beutlich
  1157. Tomasz Kłoczko
  1158. Release 2.2.5 Tue October 31 2017
  1159. Bug fixes:
  1160. #8 If the parser runs out of memory, make sure its internal
  1161. state reflects the memory it actually has, not the memory
  1162. it wanted to have.
  1163. #11 The default handler wasn't being called when it should for
  1164. a SYSTEM or PUBLIC doctype if an entity declaration handler
  1165. was registered.
  1166. #137 #138 Fix a case of mistakenly reported parsing success where
  1167. XML_StopParser was called from an element handler
  1168. #162 Function XML_ErrorString was returning NULL rather than
  1169. a message for code XML_ERROR_INVALID_ARGUMENT
  1170. introduced with release 2.2.1
  1171. Other changes:
  1172. #106 xmlwf: Add argument -N adding notation declarations
  1173. #75 #106 Test suite: Resolve expected failure cases where xmlwf
  1174. output was incomplete
  1175. #127 Windows: Fix test suite compilation
  1176. #126 #127 Windows: Fix compilation for Visual Studio 2012
  1177. Windows: Upgrade shipped project files to Visual Studio 2017
  1178. #33 #132 tests: Mass-fix compilation for XML_UNICODE_WCHAR_T
  1179. #129 examples: Fix compilation for XML_UNICODE_WCHAR_T
  1180. #130 benchmark: Fix compilation for XML_UNICODE_WCHAR_T
  1181. #144 xmlwf: Fix compilation for XML_UNICODE_WCHAR_T; still needs
  1182. Windows or MinGW for 2-byte wchar_t
  1183. #9 Address two Clang Static Analyzer false positives
  1184. #59 Resolve troublesome macros hiding parser struct membership
  1185. and dereferencing that pointer
  1186. #6 Resolve superfluous internal malloc/realloc switch
  1187. #153 #155 Improve docbook2x-man detection
  1188. #160 Undefine NDEBUG in the test suite (rather than rejecting it)
  1189. #161 Address compiler warnings
  1190. Version info bumped from 7:6:6 to 7:7:6
  1191. Special thanks to:
  1192. Benbuck Nason
  1193. Hans Wennborg
  1194. José Gutiérrez de la Concha
  1195. Pedro Monreal Gonzalez
  1196. Rhodri James
  1197. Rolf Ade
  1198. Stephen Groat
  1199. and
  1200. Core Infrastructure Initiative
  1201. Release 2.2.4 Sat August 19 2017
  1202. Bug fixes:
  1203. #115 Fix copying of partial characters for UTF-8 input
  1204. Other changes:
  1205. #109 Fix "make check" for non-x86 architectures that default
  1206. to unsigned type char (-128..127 rather than 0..255)
  1207. #109 coverage.sh: Cover -funsigned-char
  1208. Autotools: Introduce --without-xmlwf argument
  1209. #65 Autotools: Replace handwritten Makefile with GNU Automake
  1210. #43 CMake: Auto-detect high quality entropy extractors, add new
  1211. option USE_libbsd=ON to use arc4random_buf of libbsd
  1212. #74 CMake: Add -fno-strict-aliasing only where supported
  1213. #114 CMake: Always honor manually set BUILD_* options
  1214. #114 CMake: Compile man page if docbook2x-man is available, only
  1215. #117 Include file tests/xmltest.log.expected in source tarball
  1216. (required for "make run-xmltest")
  1217. #117 Include (existing) Visual Studio 2013 files in source tarball
  1218. Improve test suite error output
  1219. #111 Fix some typos in documentation
  1220. Version info bumped from 7:5:6 to 7:6:6
  1221. Special thanks to:
  1222. Jakub Wilk
  1223. Joe Orton
  1224. Lin Tian
  1225. Rolf Eike Beer
  1226. Release 2.2.3 Wed August 2 2017
  1227. Security fixes:
  1228. #82 CVE-2017-11742 -- Windows: Fix DLL hijacking vulnerability
  1229. using Steve Holme's LoadLibrary wrapper for/of cURL
  1230. Bug fixes:
  1231. #85 Fix a dangling pointer issue related to realloc
  1232. Other changes:
  1233. Increase code coverage
  1234. #91 Linux: Allow getrandom to fail if nonblocking pool has not
  1235. yet been initialized and read /dev/urandom then, instead.
  1236. This is in line with what recent Python does.
  1237. #81 Pre-10.7/Lion macOS: Support entropy from arc4random
  1238. #86 Check that a UTF-16 encoding in an XML declaration has the
  1239. right endianness
  1240. #4 #5 #7 Recover correctly when some reallocations fail
  1241. Repair "./configure && make" for systems without any
  1242. provider of high quality entropy
  1243. and try reading /dev/urandom on those
  1244. Ensure that user-defined character encodings have converter
  1245. functions when they are needed
  1246. Fix mis-leading description of argument -c in xmlwf.1
  1247. Rely on macro HAVE_ARC4RANDOM_BUF (rather than __CloudABI__)
  1248. for CloudABI
  1249. #100 Fix use of SIPHASH_MAIN in siphash.h
  1250. #23 Test suite: Fix memory leaks
  1251. Version info bumped from 7:4:6 to 7:5:6
  1252. Special thanks to:
  1253. Chanho Park
  1254. Joe Orton
  1255. Pascal Cuoq
  1256. Rhodri James
  1257. Simon McVittie
  1258. Vadim Zeitlin
  1259. Viktor Szakats
  1260. and
  1261. Core Infrastructure Initiative
  1262. Release 2.2.2 Wed July 12 2017
  1263. Security fixes:
  1264. #43 Protect against compilation without any source of high
  1265. quality entropy enabled, e.g. with CMake build system;
  1266. commit ff0207e6076e9828e536b8d9cd45c9c92069b895
  1267. #60 Windows with _UNICODE:
  1268. Unintended use of LoadLibraryW with a non-wide string
  1269. resulted in failure to load advapi32.dll and degradation
  1270. in quality of used entropy when compiled with _UNICODE for
  1271. Windows; you can launch existing binaries with
  1272. EXPAT_ENTROPY_DEBUG=1 in the environment to inspect the
  1273. quality of entropy used during runtime; commits
  1274. * 95b95032f907ef1cd17ee7a9a1768010a825d61d
  1275. * 73a5a2e9c081f49f2d775cf7ced864158b68dc80
  1276. [MOX-006] Fix non-NULL parser parameter validation in XML_Parse;
  1277. resulted in NULL dereference, previously;
  1278. commit ac256dafdffc9622ab0dc2c62fcecb0dfcfa71fe
  1279. Bug fixes:
  1280. #69 Fix improper use of unsigned long long integer literals
  1281. Other changes:
  1282. #73 Start requiring a C99 compiler
  1283. #49 Fix "==" Bashism in configure script
  1284. #50 Fix too eager getrandom detection for Debian GNU/kFreeBSD
  1285. #52 and macOS
  1286. #51 Address lack of stdint.h in Visual Studio 2003 to 2008
  1287. #58 Address compile warnings
  1288. #68 Fix "./buildconf.sh && ./configure" for some versions
  1289. of Dash for /bin/sh
  1290. #72 CMake: Ease use of Expat in context of a parent project
  1291. with multiple CMakeLists.txt files
  1292. #72 CMake: Resolve mistaken executable permissions
  1293. #76 Address compile warning with -DNDEBUG (not recommended!)
  1294. #77 Address compile warning about macro redefinition
  1295. Special thanks to:
  1296. Alexander Bluhm
  1297. Ben Boeckel
  1298. Cătălin Răceanu
  1299. Kerin Millar
  1300. László Böszörményi
  1301. S. P. Zeidler
  1302. Segev Finer
  1303. Václav Slavík
  1304. Victor Stinner
  1305. Viktor Szakats
  1306. and
  1307. Radically Open Security
  1308. Release 2.2.1 Sat June 17 2017
  1309. Security fixes:
  1310. CVE-2017-9233 -- External entity infinite loop DoS
  1311. Details: https://libexpat.github.io/doc/cve-2017-9233/
  1312. Commit c4bf96bb51dd2a1b0e185374362ee136fe2c9d7f
  1313. [MOX-002] CVE-2016-9063 -- Detect integer overflow; commit
  1314. d4f735b88d9932bd5039df2335eefdd0723dbe20
  1315. (Fixed version of existing downstream patches!)
  1316. (SF.net) #539 Fix regression from fix to CVE-2016-0718 cutting off
  1317. longer tag names; commits
  1318. * 896b6c1fd3b842f377d1b62135dccf0a579cf65d
  1319. * af507cef2c93cb8d40062a0abe43a4f4e9158fb2
  1320. #16 * 0dbbf43fdb20f593ddf4fa1ff67288000dd4a7fd
  1321. #25 More integer overflow detection (function poolGrow); commits
  1322. * 810b74e4703dcfdd8f404e3cb177d44684775143
  1323. * 44178553f3539ce69d34abee77a05e879a7982ac
  1324. [MOX-002] Detect overflow from len=INT_MAX call to XML_Parse; commits
  1325. * 4be2cb5afcc018d996f34bbbce6374b7befad47f
  1326. * 7e5b71b748491b6e459e5c9a1d090820f94544d8
  1327. [MOX-005] #30 Use high quality entropy for hash initialization:
  1328. * arc4random_buf on BSD, systems with libbsd
  1329. (when configured with --with-libbsd), CloudABI
  1330. * RtlGenRandom on Windows XP / Server 2003 and later
  1331. * getrandom on Linux 3.17+
  1332. In a way, that's still part of CVE-2016-5300.
  1333. https://github.com/libexpat/libexpat/pull/30/commits
  1334. [MOX-005] For the low quality entropy extraction fallback code,
  1335. the parser instance address can no longer leak, commit
  1336. 04ad658bd3079dd15cb60fc67087900f0ff4b083
  1337. [MOX-003] Prevent use of uninitialised variable; commit
  1338. [MOX-004] a4dc944f37b664a3ca7199c624a98ee37babdb4b
  1339. Add missing parameter validation to public API functions
  1340. and dedicated error code XML_ERROR_INVALID_ARGUMENT:
  1341. [MOX-006] * NULL checks; commits
  1342. * d37f74b2b7149a3a95a680c4c4cd2a451a51d60a (merge/many)
  1343. * 9ed727064b675b7180c98cb3d4f75efba6966681
  1344. * 6a747c837c50114dfa413994e07c0ba477be4534
  1345. * Negative length (XML_Parse); commit
  1346. [MOX-002] 70db8d2538a10f4c022655d6895e4c3e78692e7f
  1347. [MOX-001] #35 Change hash algorithm to William Ahern's version of SipHash
  1348. to go further with fixing CVE-2012-0876.
  1349. https://github.com/libexpat/libexpat/pull/39/commits
  1350. Bug fixes:
  1351. #32 Fix sharing of hash salt across parsers;
  1352. relevant where XML_ExternalEntityParserCreate is called
  1353. prior to XML_Parse, in particular (e.g. FBReader)
  1354. #28 xmlwf: Auto-disable use of memory-mapping (and parsing
  1355. as a single chunk) for files larger than ~1 GB (2^30 bytes)
  1356. rather than failing with error "out of memory"
  1357. #3 Fix double free after malloc failure in DTD code; commit
  1358. 7ae9c3d3af433cd4defe95234eae7dc8ed15637f
  1359. #17 Fix memory leak on parser error for unbound XML attribute
  1360. prefix with new namespaces defined in the same tag;
  1361. found by Google's OSS-Fuzz; commits
  1362. * 16f87daae5a16132e479e4f71862128c7a915c73
  1363. * b47dbc9745932c160893d433220e462bd605f8cd
  1364. xmlwf on Windows: Add missing calls to CloseHandle
  1365. New features:
  1366. #30 Introduced environment switch EXPAT_ENTROPY_DEBUG=1
  1367. for runtime debugging of entropy extraction
  1368. Other changes:
  1369. Increase code coverage
  1370. #33 Reject use of XML_UNICODE_WCHAR_T with sizeof(wchar_t) != 2;
  1371. XML_UNICODE_WCHAR_T was never meant to be used outside
  1372. of Windows; 4-byte wchar_t is common on Linux
  1373. (SF.net) #538 Start using -fno-strict-aliasing
  1374. (SF.net) #540 Support compilation against cloudlibc of CloudABI
  1375. Allow MinGW cross-compilation
  1376. (SF.net) #534 CMake: Introduce option "BUILD_doc" (enabled by default)
  1377. to bypass compilation of the xmlwf.1 man page
  1378. (SF.net) pr2 CMake: Introduce option "INSTALL" (enabled by default)
  1379. to bypass installation of expat files
  1380. CMake: Fix ninja support
  1381. Autotools: Add parameters --enable-xml-context [COUNT]
  1382. and --disable-xml-context; default of context of 1024
  1383. bytes enabled unchanged
  1384. #14 Drop AmigaOS 4.x code and includes
  1385. #14 Drop ancient build systems:
  1386. * Borland C++ Builder
  1387. * OpenVMS
  1388. * Open Watcom
  1389. * Visual Studio 6.0
  1390. * Pre-X Mac OS (MPW Makefile)
  1391. If you happen to rely on some of these, please get in
  1392. touch for joining with maintenance.
  1393. #10 Move from WIN32 to _WIN32
  1394. #13 Fix "make run-xmltest" order instability
  1395. Address compile warnings
  1396. Bump version info from 7:2:6 to 7:3:6
  1397. Add AUTHORS file
  1398. Infrastructure:
  1399. #1 Migrate from SourceForge to GitHub (except downloads):
  1400. https://github.com/libexpat/
  1401. #1 Re-create http://libexpat.org/ project website
  1402. Start utilizing Travis CI
  1403. Special thanks to:
  1404. Andy Wang
  1405. Don Lewis
  1406. Ed Schouten
  1407. Karl Waclawek
  1408. Pascal Cuoq
  1409. Rhodri James
  1410. Sergei Nikulov
  1411. Tobias Taschner
  1412. Viktor Szakats
  1413. and
  1414. Core Infrastructure Initiative
  1415. Mozilla Foundation (MOSS Track 3: Secure Open Source)
  1416. Radically Open Security
  1417. Release 2.2.0 Tue June 21 2016
  1418. Security fixes:
  1419. #537 CVE-2016-0718 -- Fix crash on malformed input
  1420. CVE-2016-4472 -- Improve insufficient fix to CVE-2015-1283 /
  1421. CVE-2015-2716 introduced with Expat 2.1.1
  1422. #499 CVE-2016-5300 -- Use more entropy for hash initialization
  1423. than the original fix to CVE-2012-0876
  1424. #519 CVE-2012-6702 -- Resolve troublesome internal call to srand
  1425. that was introduced with Expat 2.1.0
  1426. when addressing CVE-2012-0876 (issue #496)
  1427. Bug fixes:
  1428. Fix uninitialized reads of size 1
  1429. (e.g. in little2_updatePosition)
  1430. Fix detection of UTF-8 character boundaries
  1431. Other changes:
  1432. #532 Fix compilation for Visual Studio 2010 (keyword "C99")
  1433. Autotools: Resolve use of "$<" to better support bmake
  1434. Autotools: Add QA script "qa.sh" (and make target "qa")
  1435. Autotools: Respect CXXFLAGS if given
  1436. Autotools: Fix "make run-xmltest"
  1437. Autotools: Have "make run-xmltest" check for expected output
  1438. p90 CMake: Fix static build (BUILD_shared=OFF) on Windows
  1439. #536 CMake: Add soversion, support -DNO_SONAME=yes to bypass
  1440. #323 CMake: Add suffix "d" to differentiate debug from release
  1441. CMake: Define WIN32 with CMake on Windows
  1442. Annotate memory allocators for GCC
  1443. Address all currently known compile warnings
  1444. Make sure that API symbols remain visible despite
  1445. -fvisibility=hidden
  1446. Remove executable flag from source files
  1447. Resolve COMPILED_FROM_DSP in favor of WIN32
  1448. Special thanks to:
  1449. Björn Lindahl
  1450. Christian Heimes
  1451. Cristian Rodríguez
  1452. Daniel Krügler
  1453. Gustavo Grieco
  1454. Karl Waclawek
  1455. László Böszörményi
  1456. Marco Grassi
  1457. Pascal Cuoq
  1458. Sergei Nikulov
  1459. Thomas Beutlich
  1460. Warren Young
  1461. Yann Droneaud
  1462. Release 2.1.1 Sat March 12 2016
  1463. Security fixes:
  1464. #582: CVE-2015-1283 - Multiple integer overflows in XML_GetBuffer
  1465. Bug fixes:
  1466. #502: Fix potential null pointer dereference
  1467. #520: Symbol XML_SetHashSalt was not exported
  1468. Output of "xmlwf -h" was incomplete
  1469. Other changes:
  1470. #503: Document behavior of calling XML_SetHashSalt with salt 0
  1471. Minor improvements to man page xmlwf(1)
  1472. Improvements to the experimental CMake build system
  1473. libtool now invoked with --verbose
  1474. Release 2.1.0 Sat March 24 2012
  1475. - Security fixes:
  1476. #2958794: CVE-2012-1148 - Memory leak in poolGrow.
  1477. #2895533: CVE-2012-1147 - Resource leak in readfilemap.c.
  1478. #3496608: CVE-2012-0876 - Hash DOS attack.
  1479. #2894085: CVE-2009-3560 - Buffer over-read and crash in big2_toUtf8().
  1480. #1990430: CVE-2009-3720 - Parser crash with special UTF-8 sequences.
  1481. - Bug Fixes:
  1482. #1742315: Harmful XML_ParserCreateNS suggestion.
  1483. #1785430: Expat build fails on linux-amd64 with gcc version>=4.1 -O3.
  1484. #1983953, 2517952, 2517962, 2649838:
  1485. Build modifications using autoreconf instead of buildconf.sh.
  1486. #2815947, #2884086: OBJEXT and EXEEXT support while building.
  1487. #2517938: xmlwf should return non-zero exit status if not well-formed.
  1488. #2517946: Wrong statement about XMLDecl in xmlwf.1 and xmlwf.sgml.
  1489. #2855609: Dangling positionPtr after error.
  1490. #2990652: CMake support.
  1491. #3010819: UNEXPECTED_STATE with a trailing "%" in entity value.
  1492. #3206497: Uninitialized memory returned from XML_Parse.
  1493. #3287849: make check fails on mingw-w64.
  1494. - Patches:
  1495. #1749198: pkg-config support.
  1496. #3010222: Fix for bug #3010819.
  1497. #3312568: CMake support.
  1498. #3446384: Report byte offsets for attr names and values.
  1499. - New Features / API changes:
  1500. Added new API member XML_SetHashSalt() that allows setting an initial
  1501. value (salt) for hash calculations. This is part of the fix for
  1502. bug #3496608 to randomize hash parameters.
  1503. When compiled with XML_ATTR_INFO defined, adds new API member
  1504. XML_GetAttributeInfo() that allows retrieving the byte
  1505. offsets for attribute names and values (patch #3446384).
  1506. Added CMake build system.
  1507. See bug #2990652 and patch #3312568.
  1508. Added run-benchmark target to Makefile.in - relies on testdata module
  1509. present in the same relative location as in the repository.
  1510. Release 2.0.1 Tue June 5 2007
  1511. - Fixed bugs #1515266, #1515600: The character data handler's calling
  1512. of XML_StopParser() was not handled properly; if the parser was
  1513. stopped and the handler set to NULL, the parser would segfault.
  1514. - Fixed bug #1690883: Expat failed on EBCDIC systems as it assumed
  1515. some character constants to be ASCII encoded.
  1516. - Minor cleanups of the test harness.
  1517. - Fixed xmlwf bug #1513566: "out of memory" error on file size zero.
  1518. - Fixed outline.c bug #1543233: missing a final XML_ParserFree() call.
  1519. - Fixes and improvements for Windows platform:
  1520. bugs #1409451, #1476160, #1548182, #1602769, #1717322.
  1521. - Build fixes for various platforms:
  1522. HP-UX, Tru64, Solaris 9: patch #1437840, bug #1196180.
  1523. All Unix: #1554618 (refreshed config.sub/config.guess).
  1524. #1490371, #1613457: support both, DESTDIR and INSTALL_ROOT,
  1525. without relying on GNU-Make specific features.
  1526. #1647805: Patched configure.in to work better with Intel compiler.
  1527. - Fixes to Makefile.in to have make check work correctly:
  1528. bugs #1408143, #1535603, #1536684.
  1529. - Added Open Watcom support: patch #1523242.
  1530. Release 2.0.0 Wed Jan 11 2006
  1531. - We no longer use the "check" library for C unit testing; we
  1532. always use the (partial) internal implementation of the API.
  1533. - Report XML_NS setting via XML_GetFeatureList().
  1534. - Fixed headers for use from C++.
  1535. - XML_GetCurrentLineNumber() and XML_GetCurrentColumnNumber()
  1536. now return unsigned integers.
  1537. - Added XML_LARGE_SIZE switch to enable 64-bit integers for
  1538. byte indexes and line/column numbers.
  1539. - Updated to use libtool 1.5.22 (the most recent).
  1540. - Added support for AmigaOS.
  1541. - Some mostly minor bug fixes. SF issues include: #1006708,
  1542. #1021776, #1023646, #1114960, #1156398, #1221160, #1271642.
  1543. Release 1.95.8 Fri Jul 23 2004
  1544. - Major new feature: suspend/resume. Handlers can now request
  1545. that a parse be suspended for later resumption or aborted
  1546. altogether. See "Temporarily Stopping Parsing" in the
  1547. documentation for more details.
  1548. - Some mostly minor bug fixes, but compilation should no
  1549. longer generate warnings on most platforms. SF issues
  1550. include: #827319, #840173, #846309, #888329, #896188, #923913,
  1551. #928113, #961698, #985192.
  1552. Release 1.95.7 Mon Oct 20 2003
  1553. - Fixed enum XML_Status issue (reported on SourceForge many
  1554. times), so compilers that are properly picky will be happy.
  1555. - Introduced an XMLCALL macro to control the calling
  1556. convention used by the Expat API; this macro should be used
  1557. to annotate prototypes and definitions of callback
  1558. implementations in code compiled with a calling convention
  1559. other than the default convention for the host platform.
  1560. - Improved ability to build without the configure-generated
  1561. expat_config.h header. This is useful for applications
  1562. which embed Expat rather than linking in the library.
  1563. - Fixed a variety of bugs: see SF issues #458907, #609603,
  1564. #676844, #679754, #692878, #692964, #695401, #699323, #699487,
  1565. #820946.
  1566. - Improved hash table lookups.
  1567. - Added more regression tests and improved documentation.
  1568. Release 1.95.6 Tue Jan 28 2003
  1569. - Added XML_FreeContentModel().
  1570. - Added XML_MemMalloc(), XML_MemRealloc(), XML_MemFree().
  1571. - Fixed a variety of bugs: see SF issues #615606, #616863,
  1572. #618199, #653180, #673791.
  1573. - Enhanced the regression test suite.
  1574. - Man page improvements: includes SF issue #632146.
  1575. Release 1.95.5 Fri Sep 6 2002
  1576. - Added XML_UseForeignDTD() for improved SAX2 support.
  1577. - Added XML_GetFeatureList().
  1578. - Defined XML_Bool type and the values XML_TRUE and XML_FALSE.
  1579. - Use an incomplete struct instead of a void* for the parser
  1580. (may not retain).
  1581. - Fixed UTF-8 decoding bug that caused legal UTF-8 to be rejected.
  1582. - Finally fixed bug where default handler would report DTD
  1583. events that were already handled by another handler.
  1584. Initial patch contributed by Darryl Miles.
  1585. - Removed unnecessary DllMain() function that caused static
  1586. linking into a DLL to be difficult.
  1587. - Added VC++ projects for building static libraries.
  1588. - Reduced line-length for all source code and headers to be
  1589. no longer than 80 characters, to help with AS/400 support.
  1590. - Reduced memory copying during parsing (SF patch #600964).
  1591. - Fixed a variety of bugs: see SF issues #580793, #434664,
  1592. #483514, #580503, #581069, #584041, #584183, #584832, #585537,
  1593. #596555, #596678, #598352, #598944, #599715, #600479, #600971.
  1594. Release 1.95.4 Fri Jul 12 2002
  1595. - Added support for VMS, contributed by Craig Berry. See
  1596. vms/README.vms for more information.
  1597. - Added Mac OS (classic) support, with a makefile for MPW,
  1598. contributed by Thomas Wegner and Daryle Walker.
  1599. - Added Borland C++ Builder 5 / BCC 5.5 support, contributed
  1600. by Patrick McConnell (SF patch #538032).
  1601. - Fixed a variety of bugs: see SF issues #441449, #563184,
  1602. #564342, #566334, #566901, #569461, #570263, #575168, #579196.
  1603. - Made skippedEntityHandler conform to SAX2 (see source comment)
  1604. - Re-implemented WFC: Entity Declared from XML 1.0 spec and
  1605. added a new error "entity declared in parameter entity":
  1606. see SF bug report #569461 and SF patch #578161
  1607. - Re-implemented section 5.1 from XML 1.0 spec:
  1608. see SF bug report #570263 and SF patch #578161
  1609. Release 1.95.3 Mon Jun 3 2002
  1610. - Added a project to the MSVC workspace to create a wchar_t
  1611. version of the library; the DLLs are named libexpatw.dll.
  1612. - Changed the name of the Windows DLLs from expat.dll to
  1613. libexpat.dll; this fixes SF bug #432456.
  1614. - Added the XML_ParserReset() API function.
  1615. - Fixed XML_SetReturnNSTriplet() to work for element names.
  1616. - Made the XML_UNICODE builds usable (thanks, Karl!).
  1617. - Allow xmlwf to read from standard input.
  1618. - Install a man page for xmlwf on Unix systems.
  1619. - Fixed many bugs; see SF bug reports #231864, #461380, #464837,
  1620. #466885, #469226, #477667, #484419, #487840, #494749, #496505,
  1621. #547350. Other bugs which we can't test as easily may also
  1622. have been fixed, especially in the area of build support.
  1623. Release 1.95.2 Fri Jul 27 2001
  1624. - More changes to make MSVC happy with the build; add a single
  1625. workspace to support both the library and xmlwf application.
  1626. - Added a Windows installer for Windows users; includes
  1627. xmlwf.exe.
  1628. - Added compile-time constants that can be used to determine the
  1629. Expat version
  1630. - Removed a lot of GNU-specific dependencies to aide portability
  1631. among the various Unix flavors.
  1632. - Fix the UTF-8 BOM bug.
  1633. - Cleaned up warning messages for several compilers.
  1634. - Added the -Wall, -Wstrict-prototypes options for GCC.
  1635. Release 1.95.1 Sun Oct 22 15:11:36 EDT 2000
  1636. - Changes to get expat to build under Microsoft compiler
  1637. - Removed all aborts and instead return an UNEXPECTED_STATE error.
  1638. - Fixed a bug where a stray '%' in an entity value would cause an
  1639. abort.
  1640. - Defined XML_SetEndNamespaceDeclHandler. Thanks to Darryl Miles for
  1641. finding this oversight.
  1642. - Changed default patterns in lib/Makefile.in to fit non-GNU makes
  1643. Thanks to [email protected] for reporting and providing an
  1644. account to test on.
  1645. - The reference had the wrong label for XML_SetStartNamespaceDecl.
  1646. Reported by an anonymous user.
  1647. Release 1.95.0 Fri Sep 29 2000
  1648. - XML_ParserCreate_MM
  1649. Allows you to set a memory management suite to replace the
  1650. standard malloc,realloc, and free.
  1651. - XML_SetReturnNSTriplet
  1652. If you turn this feature on when namespace processing is in
  1653. effect, then qualified, prefixed element and attribute names
  1654. are returned as "uri|name|prefix" where '|' is whatever
  1655. separator character is used in namespace processing.
  1656. - Merged in features from perl-expat
  1657. o XML_SetElementDeclHandler
  1658. o XML_SetAttlistDeclHandler
  1659. o XML_SetXmlDeclHandler
  1660. o XML_SetEntityDeclHandler
  1661. o StartDoctypeDeclHandler takes 3 additional parameters:
  1662. sysid, pubid, has_internal_subset
  1663. o Many paired handler setters (like XML_SetElementHandler)
  1664. now have corresponding individual handler setters
  1665. o XML_GetInputContext for getting the input context of
  1666. the current parse position.
  1667. - Added reference material
  1668. - Packaged into a distribution that builds a sharable library