sync: Go 1.21 with QUIC support (#208)

* sync: Go 1.21rc3, QUIC support added (#207)

* sync: merge with upstream tag/go-1.21rc3 (#11)

* fix: all tests pass

* impl: UQUIC Transport

* deps: bump up min Go version

* new: uquic

* fix: add QUICTransportParameter

* deprecated: Go 1.19 no longer supported

Go 1.19 will fail to build or pass the test once we bump up to the new version.

* sync: crypto/tls: restrict RSA keys in certificates to <= 8192 bits (#209)

* [release-branch.go1.21] crypto/tls: restrict RSA keys in certificates to <= 8192 bits

Extremely large RSA keys in certificate chains can cause a client/server
to expend significant CPU time verifying signatures. Limit this by
restricting the size of RSA keys transmitted during handshakes to <=
8192 bits.

Based on a survey of publicly trusted RSA keys, there are currently only
three certificates in circulation with keys larger than this, and all
three appear to be test certificates that are not actively deployed. It
is possible there are larger keys in use in private PKIs, but we target
the web PKI, so causing breakage here in the interests of increasing the
default safety of users of crypto/tls seems reasonable.

Thanks to Mateusz Poliwczak for reporting this issue.

Fixes CVE-2023-29409

* build: [ci skip] boring not included

* fix: typo [ci skip]

* docs: replenish readme [ci skip]

replace old build status badge with new ones, bump up required version noted in docs, update developer contact to reflect current status.
This commit is contained in:
Gaukas Wang 2023-08-03 23:22:53 -06:00 committed by GitHub
parent d73321bb14
commit 86e9b69fdd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
150 changed files with 13344 additions and 10239 deletions

View file

@ -1,96 +1,94 @@
>>> Flow 1 (client to server)
00000000 16 03 01 01 68 01 00 01 64 03 03 a0 27 b0 af b0 |....h...d...'...|
00000010 15 2c ed 88 b2 e8 c5 67 2e db 0d 29 13 64 bb 58 |.,.....g...).d.X|
00000020 3b 71 67 a9 47 65 8a 3c 09 44 29 20 46 fe 89 4b |;qg.Ge.<.D) F..K|
00000030 f3 1d ed 40 2d 5c 1b 23 26 f5 72 6f d1 b4 77 f5 |...@-\.#&.ro..w.|
00000040 1a 9f d1 98 34 46 fe 89 0b 2d c1 f9 00 04 13 01 |....4F...-......|
00000050 00 ff 01 00 01 17 00 0b 00 04 03 00 01 02 00 0a |................|
00000000 16 03 01 01 60 01 00 01 5c 03 03 c6 2c d1 55 71 |....`...\...,.Uq|
00000010 9a 6b 02 54 cb 33 30 34 5f 22 2a bc 96 df 2e d3 |.k.T.304_"*.....|
00000020 43 9c 9a be c9 93 b9 e1 9f 42 74 20 5d a2 d5 2d |C........Bt ]..-|
00000030 d6 9f 76 0c 14 dd e0 d3 71 a6 44 6a bc 3c ff a5 |..v.....q.Dj.<..|
00000040 97 49 56 e0 3f 5b 47 87 31 83 1f 80 00 04 13 01 |.IV.?[G.1.......|
00000050 00 ff 01 00 01 0f 00 0b 00 04 03 00 01 02 00 0a |................|
00000060 00 06 00 04 00 1d 00 17 00 23 00 00 00 16 00 00 |.........#......|
00000070 00 17 00 00 00 0d 00 1e 00 1c 04 03 05 03 06 03 |................|
00000080 08 07 08 08 08 09 08 0a 08 0b 08 04 08 05 08 06 |................|
00000090 04 01 05 01 06 01 00 2b 00 03 02 03 04 00 2d 00 |.......+......-.|
000000a0 02 01 01 00 33 00 26 00 24 00 1d 00 20 8c 7b 61 |....3.&.$... .{a|
000000b0 71 c8 0b 1a 17 14 d9 eb 21 38 e6 2f c0 40 e9 2d |q.......!8./.@.-|
000000c0 3c 91 c5 4e 9d bb dd af 40 bc 91 38 74 00 29 00 |<..N....@..8t.).|
000000d0 9c 00 77 00 71 50 46 ad c1 db a8 38 86 7b 2b bb |..w.qPF....8.{+.|
000000e0 fd d0 c3 42 3e 00 00 00 00 00 00 00 00 00 00 00 |...B>...........|
000000f0 00 00 00 00 00 94 68 2c a3 82 51 ed 14 ef 68 ca |......h,..Q...h.|
00000100 42 c5 5c ab 26 c2 91 a9 01 83 13 26 8f 62 7c 89 |B.\.&......&.b|.|
00000110 c0 a2 b5 9b 6d 4f a4 c9 e2 49 34 03 2c b2 7d d9 |....mO...I4.,.}.|
00000120 af eb 1a 99 76 3c a5 ef 70 78 59 58 1c 45 80 c5 |....v<..pxYX.E..|
00000130 f1 b8 91 b2 54 71 3f bf 4f 2a b2 9d 9d 6f 6f 1c |....Tq?.O*...oo.|
00000140 f1 3c 6c e6 a2 73 00 00 00 00 00 21 20 7b 6e 44 |.<l..s.....! {nD|
00000150 ea e1 4c 20 9a d4 1c b5 32 0b d4 79 8e c7 50 fb |..L ....2..y..P.|
00000160 4e 94 6e 02 1c d3 6a 4e 86 cb ae 2c 02 |N.n...jN...,.|
000000a0 02 01 01 00 33 00 26 00 24 00 1d 00 20 8e a4 3b |....3.&.$... ..;|
000000b0 ae a1 3e 4f be 70 12 25 be 4d 07 59 da dc 08 4c |..>O.p.%.M.Y...L|
000000c0 53 e3 f3 15 b0 99 6f 5a 2d 16 30 e6 37 00 29 00 |S.....oZ-.0.7.).|
000000d0 94 00 6f 00 69 00 00 00 00 00 00 00 00 00 00 00 |..o.i...........|
000000e0 00 00 00 00 00 94 68 2d a3 82 51 ed 14 ef 68 ca |......h-..Q...h.|
000000f0 42 c5 5c 95 7a 77 9a 7a 61 99 c6 44 1e e6 5d 71 |B.\.zw.za..D..]q|
00000100 41 c8 77 d1 d4 b6 39 bb 38 57 41 b8 41 f2 02 96 |A.w...9.8WA.A...|
00000110 d0 b0 5b 99 76 3c 2b 52 f2 8f 5f 33 94 fa 66 74 |..[.v<+R.._3..ft|
00000120 cc f0 60 1b ee 0a 38 30 78 b2 9e 54 16 d6 71 0e |..`...80x..T..q.|
00000130 b2 ea 4e 0f 13 f0 6e 63 88 e7 9f 55 65 0b 00 00 |..N...nc...Ue...|
00000140 00 00 00 21 20 f1 10 27 87 e9 eb 1d b9 5f 0e f4 |...! ..'....._..|
00000150 67 e3 19 b6 52 b4 1a 9f b7 68 0c 4e 25 42 3a 78 |g...R....h.N%B:x|
00000160 91 e1 9d 62 f4 |...b.|
>>> Flow 2 (server to client)
00000000 16 03 03 00 58 02 00 00 54 03 03 cf 21 ad 74 e5 |....X...T...!.t.|
00000010 9a 61 11 be 1d 8c 02 1e 65 b8 91 c2 a2 11 16 7a |.a......e......z|
00000020 bb 8c 5e 07 9e 09 e2 c8 a8 33 9c 20 46 fe 89 4b |..^......3. F..K|
00000030 f3 1d ed 40 2d 5c 1b 23 26 f5 72 6f d1 b4 77 f5 |...@-\.#&.ro..w.|
00000040 1a 9f d1 98 34 46 fe 89 0b 2d c1 f9 13 01 00 00 |....4F...-......|
00000020 bb 8c 5e 07 9e 09 e2 c8 a8 33 9c 20 5d a2 d5 2d |..^......3. ]..-|
00000030 d6 9f 76 0c 14 dd e0 d3 71 a6 44 6a bc 3c ff a5 |..v.....q.Dj.<..|
00000040 97 49 56 e0 3f 5b 47 87 31 83 1f 80 13 01 00 00 |.IV.?[G.1.......|
00000050 0c 00 2b 00 02 03 04 00 33 00 02 00 17 14 03 03 |..+.....3.......|
00000060 00 01 01 |...|
>>> Flow 3 (client to server)
00000000 14 03 03 00 01 01 16 03 03 01 89 01 00 01 85 03 |................|
00000010 03 a0 27 b0 af b0 15 2c ed 88 b2 e8 c5 67 2e db |..'....,.....g..|
00000020 0d 29 13 64 bb 58 3b 71 67 a9 47 65 8a 3c 09 44 |.).d.X;qg.Ge.<.D|
00000030 29 20 46 fe 89 4b f3 1d ed 40 2d 5c 1b 23 26 f5 |) F..K...@-\.#&.|
00000040 72 6f d1 b4 77 f5 1a 9f d1 98 34 46 fe 89 0b 2d |ro..w.....4F...-|
00000050 c1 f9 00 04 13 01 00 ff 01 00 01 38 00 0b 00 04 |...........8....|
00000000 14 03 03 00 01 01 16 03 03 01 81 01 00 01 7d 03 |..............}.|
00000010 03 c6 2c d1 55 71 9a 6b 02 54 cb 33 30 34 5f 22 |..,.Uq.k.T.304_"|
00000020 2a bc 96 df 2e d3 43 9c 9a be c9 93 b9 e1 9f 42 |*.....C........B|
00000030 74 20 5d a2 d5 2d d6 9f 76 0c 14 dd e0 d3 71 a6 |t ]..-..v.....q.|
00000040 44 6a bc 3c ff a5 97 49 56 e0 3f 5b 47 87 31 83 |Dj.<...IV.?[G.1.|
00000050 1f 80 00 04 13 01 00 ff 01 00 01 30 00 0b 00 04 |...........0....|
00000060 03 00 01 02 00 0a 00 06 00 04 00 1d 00 17 00 23 |...............#|
00000070 00 00 00 16 00 00 00 17 00 00 00 0d 00 1e 00 1c |................|
00000080 04 03 05 03 06 03 08 07 08 08 08 09 08 0a 08 0b |................|
00000090 08 04 08 05 08 06 04 01 05 01 06 01 00 2b 00 03 |.............+..|
000000a0 02 03 04 00 2d 00 02 01 01 00 33 00 47 00 45 00 |....-.....3.G.E.|
000000b0 17 00 41 04 6e 14 0d ac 3f 1a 2a 36 54 4f ec 9d |..A.n...?.*6TO..|
000000c0 da 5b 93 12 42 eb 58 11 1b 4c 5c 39 a2 32 b8 5b |.[..B.X..L\9.2.[|
000000d0 41 13 51 05 88 fe 45 d2 01 ef 8d 14 bc 96 de d3 |A.Q...E.........|
000000e0 1c e3 eb 0c a0 a7 a3 7c 1c b1 9e 38 c2 dc f6 35 |.......|...8...5|
000000f0 7b 5b 08 2e 00 29 00 9c 00 77 00 71 50 46 ad c1 |{[...)...w.qPF..|
00000100 db a8 38 86 7b 2b bb fd d0 c3 42 3e 00 00 00 00 |..8.{+....B>....|
00000110 00 00 00 00 00 00 00 00 00 00 00 00 94 68 2c a3 |.............h,.|
00000120 82 51 ed 14 ef 68 ca 42 c5 5c ab 26 c2 91 a9 01 |.Q...h.B.\.&....|
00000130 83 13 26 8f 62 7c 89 c0 a2 b5 9b 6d 4f a4 c9 e2 |..&.b|.....mO...|
00000140 49 34 03 2c b2 7d d9 af eb 1a 99 76 3c a5 ef 70 |I4.,.}.....v<..p|
00000150 78 59 58 1c 45 80 c5 f1 b8 91 b2 54 71 3f bf 4f |xYX.E......Tq?.O|
00000160 2a b2 9d 9d 6f 6f 1c f1 3c 6c e6 a2 73 00 00 00 |*...oo..<l..s...|
00000170 00 00 21 20 10 ac 47 8c dd 4f 9c ee f3 b2 0a 6b |..! ..G..O.....k|
00000180 30 56 13 1e a9 53 5b 02 a8 a0 c0 db 1a 44 f7 43 |0V...S[......D.C|
00000190 af a3 8f b8 |....|
000000b0 17 00 41 04 ef 92 7c 5c e3 0d 1b 5c 8f 56 a2 93 |..A...|\...\.V..|
000000c0 62 86 e4 5d ea 0b 63 1e e1 ea db 85 a0 28 68 89 |b..]..c......(h.|
000000d0 07 47 d6 18 b0 6e db c2 3c 7d b4 7e a3 cb 54 25 |.G...n..<}.~..T%|
000000e0 73 9f f6 d1 83 c1 2e 67 2a db ec 4a 09 9e 20 cf |s......g*..J.. .|
000000f0 3f 8b 5d 9d 00 29 00 94 00 6f 00 69 00 00 00 00 |?.]..)...o.i....|
00000100 00 00 00 00 00 00 00 00 00 00 00 00 94 68 2d a3 |.............h-.|
00000110 82 51 ed 14 ef 68 ca 42 c5 5c 95 7a 77 9a 7a 61 |.Q...h.B.\.zw.za|
00000120 99 c6 44 1e e6 5d 71 41 c8 77 d1 d4 b6 39 bb 38 |..D..]qA.w...9.8|
00000130 57 41 b8 41 f2 02 96 d0 b0 5b 99 76 3c 2b 52 f2 |WA.A.....[.v<+R.|
00000140 8f 5f 33 94 fa 66 74 cc f0 60 1b ee 0a 38 30 78 |._3..ft..`...80x|
00000150 b2 9e 54 16 d6 71 0e b2 ea 4e 0f 13 f0 6e 63 88 |..T..q...N...nc.|
00000160 e7 9f 55 65 0b 00 00 00 00 00 21 20 fa ea cb 6c |..Ue......! ...l|
00000170 87 dc 71 c9 d3 b8 c5 6b d2 4d a7 dd 01 6c f0 26 |..q....k.M...l.&|
00000180 c6 bd 6a ce e8 37 5b a9 d3 ac 87 2d |..j..7[....-|
>>> Flow 4 (server to client)
00000000 16 03 03 00 a1 02 00 00 9d 03 03 00 00 00 00 00 |................|
00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000020 00 00 00 00 00 00 00 00 00 00 00 20 46 fe 89 4b |........... F..K|
00000030 f3 1d ed 40 2d 5c 1b 23 26 f5 72 6f d1 b4 77 f5 |...@-\.#&.ro..w.|
00000040 1a 9f d1 98 34 46 fe 89 0b 2d c1 f9 13 01 00 00 |....4F...-......|
00000020 00 00 00 00 00 00 00 00 00 00 00 20 5d a2 d5 2d |........... ]..-|
00000030 d6 9f 76 0c 14 dd e0 d3 71 a6 44 6a bc 3c ff a5 |..v.....q.Dj.<..|
00000040 97 49 56 e0 3f 5b 47 87 31 83 1f 80 13 01 00 00 |.IV.?[G.1.......|
00000050 55 00 2b 00 02 03 04 00 33 00 45 00 17 00 41 04 |U.+.....3.E...A.|
00000060 1e 18 37 ef 0d 19 51 88 35 75 71 b5 e5 54 5b 12 |..7...Q.5uq..T[.|
00000070 2e 8f 09 67 fd a7 24 20 3e b2 56 1c ce 97 28 5e |...g..$ >.V...(^|
00000080 f8 2b 2d 4f 9e f1 07 9f 6c 4b 5b 83 56 e2 32 42 |.+-O....lK[.V.2B|
00000090 e9 58 b6 d7 49 a6 b5 68 1a 41 03 56 6b dc 5a 89 |.X..I..h.A.Vk.Z.|
000000a0 00 29 00 02 00 00 17 03 03 00 17 ea 86 30 48 65 |.)...........0He|
000000b0 cf a6 d4 9d af f7 75 d4 d3 dd af 79 ce 3a 42 5b |......u....y.:B[|
000000c0 68 7a 17 03 03 00 35 ef d6 22 53 ec 3c 27 84 c7 |hz....5.."S.<'..|
000000d0 7f b2 81 8e 3e 70 51 25 95 b4 6a 79 01 15 60 c0 |....>pQ%..jy..`.|
000000e0 39 eb 5b 90 7b 50 f5 3b 50 64 d2 b2 d6 c7 72 cf |9.[.{P.;Pd....r.|
000000f0 35 f3 25 1c 86 4b 69 ab 6e 50 86 2e 17 03 03 00 |5.%..Ki.nP......|
00000100 93 66 5a c1 de c6 92 96 95 92 48 90 e7 0f e1 08 |.fZ.......H.....|
00000110 25 b2 72 a5 7f c5 17 6e 70 5d 6e 68 78 32 72 8d |%.r....np]nhx2r.|
00000120 3a fa 7a 66 76 26 10 9e f9 92 ca 3b a7 6c 6c fa |:.zfv&.....;.ll.|
00000130 72 d1 22 f4 b0 b9 2a 90 bd ce 58 e4 ff 1d 88 99 |r."...*...X.....|
00000140 a4 8d f9 10 af c8 35 cd c4 6f 99 cd 9e 6c 95 b1 |......5..o...l..|
00000150 b7 6e a4 48 9e 75 f1 d3 c0 b3 27 f1 61 83 ea 13 |.n.H.u....'.a...|
00000160 06 7f 37 38 f1 31 9e 71 5a 97 15 b5 46 63 44 e8 |..78.1.qZ...FcD.|
00000170 f4 a1 fc 81 5d f4 c7 65 be 76 da 79 bd fb e4 e6 |....]..e.v.y....|
00000180 68 de ce f3 32 6b 0c ee 19 18 75 33 77 f2 34 3d |h...2k....u3w.4=|
00000190 9e c3 da b7 |....|
000000a0 00 29 00 02 00 00 17 03 03 00 17 47 b9 2a 97 3d |.).........G.*.=|
000000b0 84 f9 65 f5 cf 27 b3 52 6d 2d 49 9d c1 c4 ea 14 |..e..'.Rm-I.....|
000000c0 d5 dc 17 03 03 00 35 21 4d a1 eb 9f 49 63 35 99 |......5!M...Ic5.|
000000d0 a3 85 ce 3a 40 cf 53 29 e6 d5 59 d5 26 12 78 c6 |...:@.S)..Y.&.x.|
000000e0 be 01 c9 a2 f2 3d ba f9 ad 80 a1 f4 78 08 71 5e |.....=......x.q^|
000000f0 04 7c df 80 0f 2d 5d e4 be 50 74 31 17 03 03 00 |.|...-]..Pt1....|
00000100 8b 90 1a fd 79 a1 b9 08 4d db 32 01 6d 36 be 1a |....y...M.2.m6..|
00000110 3f a8 b3 c7 5b 7b b1 f0 5d 55 67 ed af 87 50 16 |?...[{..]Ug...P.|
00000120 ad d9 f1 af d2 3c 18 83 52 d5 3b e3 6d 7e ab 9a |.....<..R.;.m~..|
00000130 33 cd 2c e7 f4 18 84 3a db 8b 73 d2 89 45 39 cf |3.,....:..s..E9.|
00000140 f0 19 78 ab 20 b6 81 3c 3b b5 55 2c c1 6d 6f d8 |..x. ..<;.U,.mo.|
00000150 52 1f 90 b5 ed eb e3 0c 35 40 16 ff f3 15 06 4e |R.......5@.....N|
00000160 7e 98 3b f7 43 f9 98 80 84 36 1c 63 a0 3c 4b 57 |~.;.C....6.c.<KW|
00000170 f1 89 57 df 64 b3 9a 77 86 d4 bc 85 eb 8a 1c e5 |..W.d..w........|
00000180 98 d9 f6 cb 98 e0 20 84 07 8e 9b 2b |...... ....+|
>>> Flow 5 (client to server)
00000000 17 03 03 00 35 59 51 fe aa 0a 69 ef d5 0e ee e3 |....5YQ...i.....|
00000010 0e 21 f7 e0 80 88 a0 da 23 7a 38 7f 73 e1 da e9 |.!......#z8.s...|
00000020 7c 02 73 5e f2 64 e5 60 0e c6 d5 9e 7a 45 c2 0b ||.s^.d.`....zE..|
00000030 6f 08 46 46 5b f1 5b 67 5d 42 |o.FF[.[g]B|
00000000 17 03 03 00 35 dc 6e fd 7a 4f d5 b9 d5 d8 71 b7 |....5.n.zO....q.|
00000010 14 b1 cb 86 5b e0 01 b1 75 ff 33 a3 42 36 bf fc |....[...u.3.B6..|
00000020 98 cc 15 c6 27 b2 57 1b ce f0 b7 93 15 52 29 77 |....'.W......R)w|
00000030 9e fe d2 4e fe 05 d3 a5 f7 01 |...N......|
>>> Flow 6 (server to client)
00000000 17 03 03 00 1e 3c a5 86 73 ea 62 44 ee 3b 45 a2 |.....<..s.bD.;E.|
00000010 2a 57 ed 27 0e 65 40 48 23 10 7f ff 27 e5 4e d1 |*W.'.e@H#...'.N.|
00000020 99 9a e1 17 03 03 00 13 1e 78 1a 08 4b 24 1b fc |.........x..K$..|
00000030 78 e5 ab fd 8f bf 53 26 f9 b7 c0 |x.....S&...|
00000000 17 03 03 00 1e 70 33 b5 fd 3d b0 d6 e4 54 9b 15 |.....p3..=...T..|
00000010 f9 d5 2e 12 4a ce d2 ba b2 5d fe 92 ab d0 26 da |....J....]....&.|
00000020 7c 0b 9e 17 03 03 00 13 ba a1 6a a9 db 16 2d cf ||.........j...-.|
00000030 7e 54 77 8b 0a 6e 7d 31 fc dd 5e |~Tw..n}1..^|