Skip to content

Commit

Permalink
[qt5] update to 5.15.12, patch CVE-2023-51714 (#35912)
Browse files Browse the repository at this point in the history
* [qt5] update version number and hashes

* [qt5-base] add official patch for CVE-2023-51714

* [qt5] regenerate version info
  • Loading branch information
carsten-grimm authored Dec 29, 2023
1 parent 9fd83fa commit 9d3db6b
Show file tree
Hide file tree
Showing 87 changed files with 429 additions and 127 deletions.
2 changes: 1 addition & 1 deletion ports/qt5-3d/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "qt5-3d",
"version": "5.15.11",
"version": "5.15.12",
"description": "Qt5 3d Module - Functionality for near-realtime simulation systems with support for 2D and 3D rendering",
"license": null,
"dependencies": [
Expand Down
2 changes: 1 addition & 1 deletion ports/qt5-activeqt/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "qt5-activeqt",
"version": "5.15.11",
"version": "5.15.12",
"description": "Qt5 ActiveQt Module - ActiveX components",
"license": null,
"supports": "windows",
Expand Down
2 changes: 1 addition & 1 deletion ports/qt5-androidextras/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "qt5-androidextras",
"version": "5.15.11",
"version": "5.15.12",
"description": "Qt5 androidextras Module;",
"license": null,
"supports": "android",
Expand Down
82 changes: 41 additions & 41 deletions ports/qt5-base/cmake/qt_port_hashes.cmake
Original file line number Diff line number Diff line change
@@ -1,53 +1,53 @@
# Every update requires an update of these hashes and the version within the control file of each of the 32 ports.
# So it is probably better to have a central location for these hashes and let the ports update via a script
set(QT_MAJOR_MINOR_VER 5.15)
set(QT_PATCH_VER 11)
set(QT_PATCH_VER 12)
set(QT_UPDATE_VERSION 0) # Switch to update qt and not build qt. Creates a file cmake/qt_new_hashes.cmake in qt5-base with the new hashes.

set(QT_PORT_LIST base 3d activeqt charts connectivity datavis3d declarative gamepad graphicaleffects imageformats location macextras mqtt multimedia networkauth
purchasing quickcontrols quickcontrols2 remoteobjects script scxml sensors serialport speech svg tools virtualkeyboard webchannel websockets
webview winextras xmlpatterns doc x11extras androidextras translations serialbus webengine webglplugin wayland)

set(QT_HASH_qt5-3d 34362aafbff5352786e87d98362e8961d4e2d9ad4ddd0c76ec7771375eb3f9c6f23b681c2697752ee9dad228f04e377e0a934859f70e6020dd9613b6ee760f1c)
set(QT_HASH_qt5-activeqt 33e441e56e0d59215c2884f75fbea104c2089e2b7571025f045cd03a8f5db1cf318f7f0bd7107ff2e414ddd0de13e16fbd49ad6c75ae1cef4cc4049429d3fba0)
set(QT_HASH_qt5-androidextras 6524e13c255f8350c0ac4abe8ea6a424daed60b3dc05c2aa66ecdcceace47fe4733a386dd4faf883c1014791e11f7f34633c6189907fbf8da31e81b027ef4003)
set(QT_HASH_qt5-base 4136092eec7bdceba661eee0187b7952ed6ba819148295979c0fd0392c17b0178165fa20136bdf460509a815c96f43892403294ba6e5322c54c51459c358fb7f)
set(QT_HASH_qt5-charts fe6f32b9d42a6fb6c26d4f860489be18643b1f5b32d5be348f7529fa029cfaea79af0c8493d8d26b0a9d91ebdbdc8ac0d80a3912ee40b36bed863cc5356370bf)
set(QT_HASH_qt5-connectivity f1bddff89b45352c9f98c7f94be9c5226588219036474d3be1e35b6f0c9327dcb1e8ca4e52e342863ff2e3052014eb7abbed1f9d4381174e326e3c70eebc1306)
set(QT_HASH_qt5-datavis3d 43ca0e5aa9af59d80a05166bb6cf29ab0d1a7421474d7dc974cb960dd3100d417456a2614208ccfca900e2203fd9becea12af6c15dd93107c196ebe17ad47559)
set(QT_HASH_qt5-declarative 08f76c5a1253d6014e48ef8d8c53f65d3087efea0f614f36aa03f37882c6947109b17398ac491157c4fbd0c954762e819c2f074fa5a71e6990f16a54ec7224ae)
set(QT_HASH_qt5-doc 8c7777446ca83fc7a4f2ef33b0f7e032268f67284855fd97900e07e1f7e0b7173bfb980cba206d010c489630719a5f8f08c42b222784a426b0800c4c34f097da)
set(QT_HASH_qt5-gamepad 4aa21aa51d854edd365e21e6f8f195c70998223c2a70603518b00a0efbeddf5ed9c60c33e665c1bb2dbed73e3d9b113b7fbf47287789ea54ba2a1d5c65b72c33)
set(QT_HASH_qt5-graphicaleffects 9e46eb1d985fdde3571f0327229a973b9ba4e3da360c3a890aa9c658a4cd82c20485a46ffbdbfd10c7fe4d6e3c45476682ee561ce3345f1eddebbf97eee162b0)
set(QT_HASH_qt5-imageformats a41f2adec9470433914a634e3dc79a70e2eda5713be5884029f8ef5eae3c5b2cea4c6de795907ddc69268635aef194325b047cddf84c8be4cf59668d172a89fa)
set(QT_HASH_qt5-location d439d03ff9044fc70165d1ceb5def9ec3290beec56b3e893409a24cd355651a4317e0eadff0266d38203ff84429a5fb8659a200f094669716579b6791a1a0f6d)
set(QT_HASH_qt5-macextras 5a9427c5dc21ecaac45097c731fcb3cb5c8397f0391e3da52f8aee30a6ba919b4697e6a20008b358c0086e98cb47fec678a2ed421a44c5107425432b5bc59e9a)
set(QT_HASH_qt5-mqtt 7bc1c4f3fa0097c057ffa72fd7ac68a3f7df35b1c0b93a54d53568c4743041887f3e2739c0281fcfad49909c926e9353c0a6523fd2bac62f539e4390044151fe)
set(QT_HASH_qt5-multimedia 1d72f79fe83cc955037ec6c5348058369697889a9a40b9fbaee9f3ad0cb74fe5f97062e026254e3512f0861e67cca8a36eaa19c1b3ffbea32d6b3cde2163b484)
set(QT_HASH_qt5-networkauth a7e4fcb5d5d5f80640444ae42896920c3e713df887244fbb42ce8de920270204fde1be12664ae24c075cdeea5d98da8f13aa4114524516cd9e3e5f2c68bd016f)
set(QT_HASH_qt5-purchasing 89b2d03528c4902ce2011817246f691902314383e0401638dc06c3bef4664a3d5a37edfe6f290fd7117168fa7862217b67b9a2340353b883b6e2b3741af658a8)
set(QT_HASH_qt5-quickcontrols 0779f9eb1b7b78a9f7662f5c2f7754882c0b85efbfff6e922d044757d1bc47f4c8ba0adb14b1a1347c32abd8086b6031d77c50cf534206f1988c4ce616e4953c)
set(QT_HASH_qt5-quickcontrols2 2621ae1d0c8ebb38ec2c9a0ff28b9bdb3a7aebfd2b6477d145a9772002abdae832aa7daeb8843a8372b32ebe476262650ba23cc977257fd5932499cde796eb32)
set(QT_HASH_qt5-remoteobjects ae5910c4b4da95cb927389137c2def0e75030024f5139a7634d009f9ebcc81c3f7171e6d0b3a5f3e0201a93eb8fad4d346b70fcc0aefbb1c6c69afc13c6d4848)
set(QT_HASH_qt5-script 116dc95c804fcd78082100d67c51c68c045a17754c8591cb885925c3b3541439317ae79ba7eefc1102ce12d2f544dc502fd67c4d8724f4d7f1347099cda3f744)
set(QT_HASH_qt5-scxml 7b6b9a13e8a142cbb3d10b879877dcffdcf99a815db8149f7ff869c1b967a39620b8fd0bbb5e07832b9aeb91b6152ea5b8413b25020d73531e560041525a7842)
set(QT_HASH_qt5-sensors 94c3ae48a8423fd6af5c984ae99a51cba49d396a6d7032ba29008aa9bea461199986d52449f838278285a98aa3c0a95bb62868368bdc5879ca696273608a74d6)
set(QT_HASH_qt5-serialbus 2f51b449242a05a50cdf761f639dc9fa178eca5531cc520fdd22a1a18e3bac7244acc5a4b596f1ca11dbf7bff38181b451f6cb8de6fcee63165316a5b09956d8)
set(QT_HASH_qt5-serialport ff863b20283f36f865dbcf363faff5555234438ac29f475f98f2a351bbcac320fb1764ecc42f0cdcc729b6b6a64792ca86f35cfa2567d9ade5ef72ff2e493e2f)
set(QT_HASH_qt5-speech 658eb9d24ea2f2bf39c6f4cd6dc75677067c8058cae694b53e665e28a273d2f730ab0dd4744ca8f8db224e52bb014fd145af1abd1667e3cd37f74c51bf96ebf4)
set(QT_HASH_qt5-svg ac04197aa69342aa403f476e41a8ea7b1895187812577afe32536130d5605fb1dc7f99c0aef368ccbacb673f8b41efe44a200643b905e4674379aa951a48cf59)
set(QT_HASH_qt5-tools 7aa66964dfc4bd144ee828a5c278b3127c5b269c6fb0e5363e7d2377ba19165e04719636659cb30fee471de26740d3d8692068459e1764d9f84a7737f24c4884)
set(QT_HASH_qt5-translations bb1d5c353932566b3daccc8b4d9ad957d3c4ea130e67eb933c0a7e49b99d2f9cac2860201a12e37ea51e46ae772a75a4be80d71e3a8afa59f5e14d3e02dd1ce2)
set(QT_HASH_qt5-virtualkeyboard 771088a6f847c901f59c14e32225410a4b174d2e9eb026928acba41e7dc2f658ad09d054846a06efb262fe198c1ddfbaf1014a61257856014c6ca2498747cc0e)
set(QT_HASH_qt5-wayland b47a3358bc37f52dde0839940431e8049abfaa827722e6d57362b07547c35fe9fb422d28fd28c69a13f5773c24efc3eeea1e584372737a0151ed94bf4c5b9980)
set(QT_HASH_qt5-webchannel 499e67d83d08476ee4b9da6c331a459b595ace3c6a7cbc7e1d8660b551cc0a87ef50e5d9d69a7783614c67db46df7802fdb4a2e79edb76012f6d26ceb3417eeb)
set(QT_HASH_qt5-webengine cebda17b9023348c85e9397fce5ad0f8ee16cfe821b8e79cea7ce92f7bb00e7fe59594107ac9f9411df1bb2e675eb6ecbfe3366df67a05b45fe12ead97cdc76c)
set(QT_HASH_qt5-webglplugin cbbab9ac54b38dfaa3f492ded0796ea942c24534d001980f71f5d1f35786c7c455de8a187608caa9ec4d9d1a0ed7dba19dc03de00414ac69efec48ff8c69f2ed)
set(QT_HASH_qt5-websockets 644182da57f0b3b77a434abcfe67731178cb0e62bc8743c85bda24e137f2fe686728b10a73f5030d8f357cc616c2e681de15598bedf4d01d4cb705482235bbcd)
set(QT_HASH_qt5-webview 7a741b3bb79b9aeaca05130ad8346a2dc704a203654754c73953d37a88d4c923375c3db44ddc22ea0b9856abedb7daf99e89d4f387014dfe8fbb31aaea6a7e38)
set(QT_HASH_qt5-winextras a387da6da092267545c78caff54dd95958be1840913f8ebe66320d35d8328ced2bb2b0cc85f0e2f7138f937fd828141e573d45c805e2da47c7b050bf961f2fb5)
set(QT_HASH_qt5-x11extras e1135ed8d1800d59f039e82ce33f3c84ac87df29ad61a60b2a0d25d78e4e38e2e1800406513d45abd3af79a2821698ca5d71161d6ad1f3b05deb3fad7599f654)
set(QT_HASH_qt5-xmlpatterns 73326aaa7fef65e00e3a585952d06841bba0905c1cb9a753b6c636e01fd7bf8cc66dadbe962ed962523f234c7461463ed893b045a7e3c2f0fbfb5e9aecf7a802)
set(QT_HASH_qt5-3d fe66aebdfda50c75f588d5dfc1c48c4d39c1e7aa29ee342178016a10ca24dfa00284f89839810121d15aac40d47fcd471f7a3573892210a0abf14e247102a66d)
set(QT_HASH_qt5-activeqt 4afd89ccfb142dd72841d0d5129ef2175106c31b7a710ebd6f630cca18da2009b1fcd3b094e769f2ea24d4f67e9302441b8fdd80174823328fa3d22ad5957e7c)
set(QT_HASH_qt5-androidextras b181b8e42c19ca2946245cbcdbe19ba8c1fd1f9ab6988a6d1b920bb1895019372b529626789953722ccf28805f9171146d3bc38c3f0c72ed5511a1753ec38e00)
set(QT_HASH_qt5-base 55ed3d73c2486a5f7cc62c0669b6344d1e4566be442bdac5849609f5ecd4fec7b74405952215e4dc018bc48a9dc2305ef50e31b61f3ace20408b5b64a2d5e888)
set(QT_HASH_qt5-charts 543c9fe0dfd04f19407d3c11c2a1ed93da34b493cfb758b4b2a9e86a7325476e1f754de3281e366eff52e96d8f12fb44c9ff8f3e047069c409cb171687d11df4)
set(QT_HASH_qt5-connectivity 36cbdaf63e7f478a5bb1b51d14b8671a24251614fc99d07cab195a596a9b60f28dd013c5f2a3af914f655a12725b1e6e2318324393ee0f0586c746a1a670f224)
set(QT_HASH_qt5-datavis3d 6a734bd1e3296aaae94358e2315a7c4b033b113b27b9e1e75f0d888231c11c2fdf1caa17c40c4ed545ad8e4a735766368c1bf04e6b36e53ba3164f0f8d66a1c6)
set(QT_HASH_qt5-declarative 3ebe195dac22efa2e71a4520e4816592204431bc724d94a38d9f426424624990199f7e99b72c7d96f6ae324bb18b7eec89ea2b5db63ff2f1d24a997be25a0589)
set(QT_HASH_qt5-doc 46133676da2584c533bbe78d8eef12f2b1baa95e91168f7fa3400e58046c36a31064f6198f40e1679224da8824e642c6f610fba125b71e91399069019eaf68e6)
set(QT_HASH_qt5-gamepad 8a5f6c8fac4e7977b1c93efda698e27c6bc1e66b844f86642ae05ba104d8f14f30e6cb95ba4b3923e2e43d117af52354cfb5a6d35ffd159e29a336710fc63f93)
set(QT_HASH_qt5-graphicaleffects c0993082e96c5d8e26cc4e2e45320542d21fb7c716dfb6b087b385a985fff358cdff7e3d5d4ca3fc8fc9813e7c110165aa034d5e8d32e8082ad007b7bf929531)
set(QT_HASH_qt5-imageformats c56e70e17ed29ff126257ce41e2b9fd03807f0325ac60bd307779406dcea39ff929e49d2ea99ab17f07f19a6dda5f5103d4def6bb70a52f761141fc4b2c46e7c)
set(QT_HASH_qt5-location c480762cea2cd1a00e6061bab05c402d5aab2d12e7decebcd606c930d2029a93f2a46f8edbb188b73c7cdcad473b03c15037ea10e0b3538de0a99b1d7d7fb333)
set(QT_HASH_qt5-macextras 205fc0747dff5a7e8b199ccf82675484064e71c4267741fb1ae7ab4961436d8e645126dd548b9236f27f29379a297a1efce82a1f8589f081aadd752a9875034e)
set(QT_HASH_qt5-mqtt eaad1a8b8ad3f18181e5840dca725a9ac445ef0cdacb3eaffc682e145f6db2f4ffd1742329b2ea57653ba3d1a7168c3e9e531b9f48784ca2fef726197b4b50a4)
set(QT_HASH_qt5-multimedia 2cef917df20da1381ea64834e4110e25ea0d5e12249176ddbe2e0314c25490926ccbf2f7cc3f89b2969d113a645ec88244fabe691aff851ffb4b2be9766bcf76)
set(QT_HASH_qt5-networkauth f0c48453e21ad14a4fbac25d35e6257c4d8bbb5f2ac87dad0deee44ca86aec8def618f102cd1d9af05e1611f37ea722e1630165f15a238d3d8c38d161771bc3d)
set(QT_HASH_qt5-purchasing 5a5e8ca1de6155b20164e5f3e28daaed424afa05b1ddae3c07207e056183fb6dfce71a9de9c9c8ca1bb1e10ecb02139db79b0e5e701e8c11c6514274e21e5069)
set(QT_HASH_qt5-quickcontrols 980b233f83991d12029bac90b0875b3a001399d4358c58185a21bbb30911f0d6fec5dfc5f157e9c3c4d17e82c3ff5302e55c62b4cd63731f23a655bd55d300bb)
set(QT_HASH_qt5-quickcontrols2 725fb03907973fdca4479017b8f792110a4620a6e4d39f97c81c3be16280b81135394f6ce5be507fd734926307d33a249e790234139e01f387d2362cd7027128)
set(QT_HASH_qt5-remoteobjects fef775ccbc187064ef3e2cb73f9bc784c002bf74d89032a33767cb234ff40ea07eb5294eb919a50cede2afbf539e32c6c78df52817bc22a10617585e417c3690)
set(QT_HASH_qt5-script 48a00763686a5455d0429d1ecd6b32e3e96a13f05faa6625361c49b91275b8a8b3a1de3627cc3db5c69d346686c07b9466022cf37abf394a6f097933b9dbed4a)
set(QT_HASH_qt5-scxml c451fa8fc5999aa7e3b3a336503bcf1ccc8992ef27645d003c938166384508d2cc9b35fbd21e9da641ea98a2aaa58834ac85e8713bce25b96e4aef79c3cda976)
set(QT_HASH_qt5-sensors 25d4eb1ea43c5d7819a7b9cee22604b774007f84bdc86433f673766b1943134c5880be14ab06fac7f05fb2708491cb8b7e03f8656aae0d74538d732e31ffd917)
set(QT_HASH_qt5-serialbus d6571b6d54fe91ff945c0bd51bcecb97ae3d001ee3e1f30deb042a52bab17ad7e059ae943c0a3f2a4d6e7a952cb3f68b71275cef0fda1875fd233c8dc17d0d3c)
set(QT_HASH_qt5-serialport f27adbc07a3c3e946761e033105377ae26ac48d2c796f281947e950de1b7b9fb5a25627fd1a2c30cccd2de19181867cfd7d4a740a3318348e57885b5d96c7192)
set(QT_HASH_qt5-speech 960eb661cfeb8a4fc01337ac998bc8ce101da73782155e75a7b128987d9809fa1e4cc6fee30cfa3cbd39f7fff9bbe7e49e55430681ac6582e7c8110242d7183a)
set(QT_HASH_qt5-svg c68fa1bc8e3dc782a70049aeddca62731b48ff7de972d6e1a245b06d23c0795fd6a3e3538aa39a92016d5c15a068f7b8ae1d3b6bd950fb7857a7aa2ed556f857)
set(QT_HASH_qt5-tools d830129777c481e1a66e32911af82a09e2858b678fdd2b802433fc1009856d9f0b8ea39b6ed1d7e93b6e9db1dda848c3a4077f6d804400f1427f33a3c7ccb40e)
set(QT_HASH_qt5-translations 675e0902bbd6a1f910ffc0473e1e865239cf820886fff9ccc3c5cf69f6a9af862fa1e44d86538f2884f1a34ab433dc2615707487b426d56742bd26f8f0d9924a)
set(QT_HASH_qt5-virtualkeyboard 17c63ea6287f7dbc84c82762ea43da9fbb4d1c7281a4e81971c10eacfbfe7293a855dde35a37ed9c8cf5ccc289a0e1d0a0c970e6908cea5cae15f149b9f5e3c4)
set(QT_HASH_qt5-wayland acd78018665db3d0d77a84bb80ce7dbb65a33e0e813c3308e09a27195df204029b5e580f353eae2536e6fdde249aa34411e37f4f1663f7645448d96c9df67a66)
set(QT_HASH_qt5-webchannel 8b4f3c787e88a68a9b850c7c700e37b491ff17435871223fd70373a532e4d8c6d809d4b8ca0036b68f99852dbd80e21e45aa2ee2d89efffab1182fdf792d0d59)
set(QT_HASH_qt5-webengine 84ebdab10ea3138671c0612cc558dd3257264410d2776719c34d41b8f846424183742abc7185fa61c7bb3d35d471ab2341d064eec57b92c34e30325dbc3eff63)
set(QT_HASH_qt5-webglplugin 97670f47e582ec921c409b346f08bc70040a982811d9df967635900e4654b7069ca22ba5a6504b0f8a6b0022c317ffa71a3b60043212078d2b29cb1d2daf69ae)
set(QT_HASH_qt5-websockets 01195f4b2f11baa66e1b3d08148c234ac979d1a80be28d72b2bb8cd57f053102f432f59b7b89daa66d0e27c6e5ee792da12772d70c76aa88fa1bbe114b6f675a)
set(QT_HASH_qt5-webview eaabc534a116617dee0394afdb4d35525aa367d01d974c4759c02781a7e4af2fa2d096c638109b421d2b061df4476348d8471a9a02f6f05b97170366c973ef61)
set(QT_HASH_qt5-winextras da230ee9c9afccad83573a678c641f22f85ab45d7063406ef1b1922097b4b41fca9f1ca81256bba835e71a3f59f6280601f9fad3f7d5be74e436a242e3ef45eb)
set(QT_HASH_qt5-x11extras f346f399a79aece2635e3871d86302042834d17be143adbfa130ea91a6cd692211804c50e74cecb072a5d7c388f3fbf774b2b40b0fc86498b84552da7b213fe7)
set(QT_HASH_qt5-xmlpatterns 762c1c64e8ab269bf74de86f08afd50822859716024f3b13a70b719aeedfd35fd705fa03e32220f5cfab579361e754823d8bd584b30bde5965b026aa54b97142)

if(QT_UPDATE_VERSION)
message(STATUS "Running Qt in automatic version port update mode!")
Expand Down
38 changes: 38 additions & 0 deletions ports/qt5-base/patches/0001-CVE-2023-51714-qtbase-5.15.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
From ea63c28efc1d2ecb467b83a34923d12462efa96f Mon Sep 17 00:00:00 2001
From: Marc Mutz <marc.mutz@qt.io>
Date: Tue, 12 Dec 2023 20:51:56 +0100
Subject: [PATCH] HPack: fix a Yoda Condition

Putting the variable on the LHS of a relational operation makes the
expression easier to read. In this case, we find that the whole
expression is nonsensical as an overflow protection, because if
name.size() + value.size() overflows, the result will exactly _not_
be > max() - 32, because UB will have happened.

To be fixed in a follow-up commit.

As a drive-by, add parentheses around the RHS.

Change-Id: I35ce598884c37c51b74756b3bd2734b9aad63c09
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 658607a34ead214fbacbc2cca44915655c318ea9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 4f7efd41740107f90960116700e3134f5e433867)
(cherry picked from commit 13c16b756900fe524f6d9534e8a07aa003c05e0c)
(cherry picked from commit 1d4788a39668fb2dc5912a8d9c4272dc40e99f92)
(cherry picked from commit 87de75b5cc946d196decaa6aef4792a6cac0b6db)
---

diff --git a/src/network/access/http2/hpacktable.cpp b/src/network/access/http2/hpacktable.cpp
index 834214f..ab166a6 100644
--- a/src/network/access/http2/hpacktable.cpp
+++ b/src/network/access/http2/hpacktable.cpp
@@ -63,7 +63,7 @@
// 32 octets of overhead."

const unsigned sum = unsigned(name.size() + value.size());
- if (std::numeric_limits<unsigned>::max() - 32 < sum)
+ if (sum > (std::numeric_limits<unsigned>::max() - 32))
return HeaderSize();
return HeaderSize(true, quint32(sum + 32));
}
59 changes: 59 additions & 0 deletions ports/qt5-base/patches/0002-CVE-2023-51714-qtbase-5.15.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
From 23c3fc483e8b6e21012a61f0bea884446f727776 Mon Sep 17 00:00:00 2001
From: Marc Mutz <marc.mutz@qt.io>
Date: Tue, 12 Dec 2023 22:08:07 +0100
Subject: [PATCH] HPack: fix incorrect integer overflow check

This code never worked:

For the comparison with max() - 32 to trigger, on 32-bit platforms (or
Qt 5) signed interger overflow would have had to happen in the
addition of the two sizes. The compiler can therefore remove the
overflow check as dead code.

On Qt 6 and 64-bit platforms, the signed integer addition would be
very unlikely to overflow, but the following truncation to uint32
would yield the correct result only in a narrow 32-value window just
below UINT_MAX, if even that.

Fix by using the proper tool, qAddOverflow.

Manual conflict resolutions:
- qAddOverflow doesn't exist in Qt 5, use private add_overflow
predecessor API instead

Change-Id: I7599f2e75ff7f488077b0c60b81022591005661c
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit ee5da1f2eaf8932aeca02ffea6e4c618585e29e3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit debeb8878da2dc706ead04b6072ecbe7e5313860)
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 811b9eef6d08d929af8708adbf2a5effb0eb62d7)
(cherry picked from commit f931facd077ce945f1e42eaa3bead208822d3e00)
(cherry picked from commit 9ef4ca5ecfed771dab890856130e93ef5ceabef5)
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
---

diff --git a/src/network/access/http2/hpacktable.cpp b/src/network/access/http2/hpacktable.cpp
index ab166a6..de91fc0 100644
--- a/src/network/access/http2/hpacktable.cpp
+++ b/src/network/access/http2/hpacktable.cpp
@@ -40,6 +40,7 @@
#include "hpacktable_p.h"

#include <QtCore/qdebug.h>
+#include <QtCore/private/qnumeric_p.h>

#include <algorithm>
#include <cstddef>
@@ -62,7 +63,9 @@
// for counting the number of references to the name and value would have
// 32 octets of overhead."

- const unsigned sum = unsigned(name.size() + value.size());
+ size_t sum;
+ if (add_overflow(size_t(name.size()), size_t(value.size()), &sum))
+ return HeaderSize();
if (sum > (std::numeric_limits<unsigned>::max() - 32))
return HeaderSize();
return HeaderSize(true, quint32(sum + 32));
2 changes: 2 additions & 0 deletions ports/qt5-base/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ qt_download_submodule( OUT_SOURCE_PATH SOURCE_PATH
patches/CVE-2023-37369-qtbase-5.15.diff
patches/CVE-2023-38197-qtbase-5.15.diff
patches/CVE-2023-43114-5.15.patch
patches/0001-CVE-2023-51714-qtbase-5.15.diff
patches/0002-CVE-2023-51714-qtbase-5.15.diff

patches/winmain_pro.patch #Moves qtmain to manual-link
patches/windows_prf.patch #fixes the qtmain dependency due to the above move
Expand Down
3 changes: 1 addition & 2 deletions ports/qt5-base/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "qt5-base",
"version": "5.15.11",
"port-version": 1,
"version": "5.15.12",
"description": "Qt5 Application Framework Base Module. Includes Core, GUI, Widgets, Networking, SQL, Concurrent and other essential qt components.",
"homepage": "https://www.qt.io/",
"license": null,
Expand Down
2 changes: 1 addition & 1 deletion ports/qt5-charts/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "qt5-charts",
"version": "5.15.11",
"version": "5.15.12",
"description": "Qt5 Charts Module - UI components for displaying charts, driven by static or dynamic data models",
"license": null,
"dependencies": [
Expand Down
2 changes: 1 addition & 1 deletion ports/qt5-connectivity/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "qt5-connectivity",
"version": "5.15.11",
"version": "5.15.12",
"description": "Qt5 Connectivity module - Provides access to Bluetooth and NFC hardware",
"license": null,
"dependencies": [
Expand Down
Loading

0 comments on commit 9d3db6b

Please sign in to comment.