]> Cypherpunks.ru repositories - gostls13.git/commitdiff
all: update vendored dependencies
authorMatthew Dempsky <mdempsky@google.com>
Fri, 26 May 2023 21:34:56 +0000 (14:34 -0700)
committerGopher Robot <gobot@golang.org>
Fri, 26 May 2023 22:45:40 +0000 (22:45 +0000)
Generated with x/build/cmd/updatestd.

Updates #36905.

Change-Id: Iecd76e820c5f40a0f5e013684f7e7bef4c3fd482
Reviewed-on: https://go-review.googlesource.com/c/go/+/498598
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>

14 files changed:
src/cmd/go.mod
src/cmd/go.sum
src/cmd/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go
src/cmd/vendor/golang.org/x/sys/unix/ztypes_linux.go
src/cmd/vendor/golang.org/x/sys/windows/syscall_windows.go
src/cmd/vendor/golang.org/x/sys/windows/zsyscall_windows.go
src/cmd/vendor/modules.txt
src/go.mod
src/go.sum
src/net/http/h2_bundle.go
src/vendor/golang.org/x/crypto/cryptobyte/asn1.go
src/vendor/golang.org/x/net/dns/dnsmessage/message.go
src/vendor/golang.org/x/sys/cpu/endian_little.go
src/vendor/modules.txt

index 8625390a270c322b1c1497e974451efb8b51d461..32da6ff3de73f4bb95b00db7385e1d6bf1d7fd16 100644 (file)
@@ -4,12 +4,12 @@ go 1.21
 
 require (
        github.com/google/pprof v0.0.0-20221118152302-e6195bd50e26
-       golang.org/x/arch v0.2.1-0.20230208145055-40c19ba4a7c5
+       golang.org/x/arch v0.3.0
        golang.org/x/mod v0.10.1-0.20230523205221-fc83a8faf993
-       golang.org/x/sync v0.2.0
-       golang.org/x/sys v0.8.0
-       golang.org/x/term v0.5.0
-       golang.org/x/tools v0.9.2-0.20230517205458-8b4b27bce44f
+       golang.org/x/sync v0.2.1-0.20230523185436-4966af63bb0c
+       golang.org/x/sys v0.8.1-0.20230523194307-b5c7a0975ddc
+       golang.org/x/term v0.8.0
+       golang.org/x/tools v0.9.2-0.20230526183654-5974258e689a
 )
 
 require github.com/ianlancetaylor/demangle v0.0.0-20220319035150-800ac71e25c2 // indirect
index 6f9ec82ada108411e049f930feefc9392f301ffd..2af241c78ac84b5d0a339443520667625309fe37 100644 (file)
@@ -2,15 +2,15 @@ github.com/google/pprof v0.0.0-20221118152302-e6195bd50e26 h1:Xim43kblpZXfIBQsbu
 github.com/google/pprof v0.0.0-20221118152302-e6195bd50e26/go.mod h1:dDKJzRmX4S37WGHujM7tX//fmj1uioxKzKxz3lo4HJo=
 github.com/ianlancetaylor/demangle v0.0.0-20220319035150-800ac71e25c2 h1:rcanfLhLDA8nozr/K289V1zcntHr3V+SHlXwzz1ZI2g=
 github.com/ianlancetaylor/demangle v0.0.0-20220319035150-800ac71e25c2/go.mod h1:aYm2/VgdVmcIU8iMfdMvDMsRAQjcfZSKFby6HOFvi/w=
-golang.org/x/arch v0.2.1-0.20230208145055-40c19ba4a7c5 h1:UFbINK7+lzLJEIqCXPlzx05ivYhLQeXCkxW3SSH3f8Q=
-golang.org/x/arch v0.2.1-0.20230208145055-40c19ba4a7c5/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8=
+golang.org/x/arch v0.3.0 h1:02VY4/ZcO/gBOH6PUaoiptASxtXU10jazRCP865E97k=
+golang.org/x/arch v0.3.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8=
 golang.org/x/mod v0.10.1-0.20230523205221-fc83a8faf993 h1:hr4tBhz2ITxV3Dj4xUzXUVtuRnMSzdWcTF8JYcrbdGs=
 golang.org/x/mod v0.10.1-0.20230523205221-fc83a8faf993/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
-golang.org/x/sync v0.2.0 h1:PUR+T4wwASmuSTYdKjYHI5TD22Wy5ogLU5qZCOLxBrI=
-golang.org/x/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU=
-golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/term v0.5.0 h1:n2a8QNdAb0sZNpU9R1ALUXBbY+w51fCQDN+7EdxNBsY=
-golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
-golang.org/x/tools v0.9.2-0.20230517205458-8b4b27bce44f h1:EbCQ6q1oiCDTdXb+iqfNKm2eGCxAXj1nOGVbzcPKZ9g=
-golang.org/x/tools v0.9.2-0.20230517205458-8b4b27bce44f/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc=
+golang.org/x/sync v0.2.1-0.20230523185436-4966af63bb0c h1:w3VOlmQViynAglgPijJYTjrryY2u09i59amSGCFck24=
+golang.org/x/sync v0.2.1-0.20230523185436-4966af63bb0c/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y=
+golang.org/x/sys v0.8.1-0.20230523194307-b5c7a0975ddc h1:p4WpFbnzwh0EhIaGMueCjfMUkyWX6WQcJfxbS7GOQtQ=
+golang.org/x/sys v0.8.1-0.20230523194307-b5c7a0975ddc/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/term v0.8.0 h1:n5xxQn2i3PC0yLAbjTpNT85q/Kgzcr2gIoX9OrJUols=
+golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
+golang.org/x/tools v0.9.2-0.20230526183654-5974258e689a h1:czMl6qpiocFoGyqk9BcRHqf9ssTZke6W2+J5LNuKIR0=
+golang.org/x/tools v0.9.2-0.20230526183654-5974258e689a/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc=
index f619252691e2ac47c638c9c36a788f38d447741e..48984202c65fbe8dfb4b557e44709128ccc353e6 100644 (file)
@@ -329,6 +329,54 @@ const (
        SCM_WIFI_STATUS                  = 0x25
        SFD_CLOEXEC                      = 0x400000
        SFD_NONBLOCK                     = 0x4000
+       SF_FP                            = 0x38
+       SF_I0                            = 0x20
+       SF_I1                            = 0x24
+       SF_I2                            = 0x28
+       SF_I3                            = 0x2c
+       SF_I4                            = 0x30
+       SF_I5                            = 0x34
+       SF_L0                            = 0x0
+       SF_L1                            = 0x4
+       SF_L2                            = 0x8
+       SF_L3                            = 0xc
+       SF_L4                            = 0x10
+       SF_L5                            = 0x14
+       SF_L6                            = 0x18
+       SF_L7                            = 0x1c
+       SF_PC                            = 0x3c
+       SF_RETP                          = 0x40
+       SF_V9_FP                         = 0x70
+       SF_V9_I0                         = 0x40
+       SF_V9_I1                         = 0x48
+       SF_V9_I2                         = 0x50
+       SF_V9_I3                         = 0x58
+       SF_V9_I4                         = 0x60
+       SF_V9_I5                         = 0x68
+       SF_V9_L0                         = 0x0
+       SF_V9_L1                         = 0x8
+       SF_V9_L2                         = 0x10
+       SF_V9_L3                         = 0x18
+       SF_V9_L4                         = 0x20
+       SF_V9_L5                         = 0x28
+       SF_V9_L6                         = 0x30
+       SF_V9_L7                         = 0x38
+       SF_V9_PC                         = 0x78
+       SF_V9_RETP                       = 0x80
+       SF_V9_XARG0                      = 0x88
+       SF_V9_XARG1                      = 0x90
+       SF_V9_XARG2                      = 0x98
+       SF_V9_XARG3                      = 0xa0
+       SF_V9_XARG4                      = 0xa8
+       SF_V9_XARG5                      = 0xb0
+       SF_V9_XXARG                      = 0xb8
+       SF_XARG0                         = 0x44
+       SF_XARG1                         = 0x48
+       SF_XARG2                         = 0x4c
+       SF_XARG3                         = 0x50
+       SF_XARG4                         = 0x54
+       SF_XARG5                         = 0x58
+       SF_XXARG                         = 0x5c
        SIOCATMARK                       = 0x8905
        SIOCGPGRP                        = 0x8904
        SIOCGSTAMPNS_NEW                 = 0x40108907
index ca84727cfe804a92888b02d55de324b271525253..00c3b8c20f3fb7556ba82af507fa1ce0e6e4e533 100644 (file)
@@ -2555,6 +2555,11 @@ const (
        BPF_REG_8                                  = 0x8
        BPF_REG_9                                  = 0x9
        BPF_REG_10                                 = 0xa
+       BPF_CGROUP_ITER_ORDER_UNSPEC               = 0x0
+       BPF_CGROUP_ITER_SELF_ONLY                  = 0x1
+       BPF_CGROUP_ITER_DESCENDANTS_PRE            = 0x2
+       BPF_CGROUP_ITER_DESCENDANTS_POST           = 0x3
+       BPF_CGROUP_ITER_ANCESTORS_UP               = 0x4
        BPF_MAP_CREATE                             = 0x0
        BPF_MAP_LOOKUP_ELEM                        = 0x1
        BPF_MAP_UPDATE_ELEM                        = 0x2
@@ -2566,6 +2571,7 @@ const (
        BPF_PROG_ATTACH                            = 0x8
        BPF_PROG_DETACH                            = 0x9
        BPF_PROG_TEST_RUN                          = 0xa
+       BPF_PROG_RUN                               = 0xa
        BPF_PROG_GET_NEXT_ID                       = 0xb
        BPF_MAP_GET_NEXT_ID                        = 0xc
        BPF_PROG_GET_FD_BY_ID                      = 0xd
@@ -2610,6 +2616,7 @@ const (
        BPF_MAP_TYPE_CPUMAP                        = 0x10
        BPF_MAP_TYPE_XSKMAP                        = 0x11
        BPF_MAP_TYPE_SOCKHASH                      = 0x12
+       BPF_MAP_TYPE_CGROUP_STORAGE_DEPRECATED     = 0x13
        BPF_MAP_TYPE_CGROUP_STORAGE                = 0x13
        BPF_MAP_TYPE_REUSEPORT_SOCKARRAY           = 0x14
        BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE         = 0x15
@@ -2620,6 +2627,10 @@ const (
        BPF_MAP_TYPE_STRUCT_OPS                    = 0x1a
        BPF_MAP_TYPE_RINGBUF                       = 0x1b
        BPF_MAP_TYPE_INODE_STORAGE                 = 0x1c
+       BPF_MAP_TYPE_TASK_STORAGE                  = 0x1d
+       BPF_MAP_TYPE_BLOOM_FILTER                  = 0x1e
+       BPF_MAP_TYPE_USER_RINGBUF                  = 0x1f
+       BPF_MAP_TYPE_CGRP_STORAGE                  = 0x20
        BPF_PROG_TYPE_UNSPEC                       = 0x0
        BPF_PROG_TYPE_SOCKET_FILTER                = 0x1
        BPF_PROG_TYPE_KPROBE                       = 0x2
@@ -2651,6 +2662,7 @@ const (
        BPF_PROG_TYPE_EXT                          = 0x1c
        BPF_PROG_TYPE_LSM                          = 0x1d
        BPF_PROG_TYPE_SK_LOOKUP                    = 0x1e
+       BPF_PROG_TYPE_SYSCALL                      = 0x1f
        BPF_CGROUP_INET_INGRESS                    = 0x0
        BPF_CGROUP_INET_EGRESS                     = 0x1
        BPF_CGROUP_INET_SOCK_CREATE                = 0x2
@@ -2689,6 +2701,12 @@ const (
        BPF_XDP_CPUMAP                             = 0x23
        BPF_SK_LOOKUP                              = 0x24
        BPF_XDP                                    = 0x25
+       BPF_SK_SKB_VERDICT                         = 0x26
+       BPF_SK_REUSEPORT_SELECT                    = 0x27
+       BPF_SK_REUSEPORT_SELECT_OR_MIGRATE         = 0x28
+       BPF_PERF_EVENT                             = 0x29
+       BPF_TRACE_KPROBE_MULTI                     = 0x2a
+       BPF_LSM_CGROUP                             = 0x2b
        BPF_LINK_TYPE_UNSPEC                       = 0x0
        BPF_LINK_TYPE_RAW_TRACEPOINT               = 0x1
        BPF_LINK_TYPE_TRACING                      = 0x2
@@ -2696,6 +2714,9 @@ const (
        BPF_LINK_TYPE_ITER                         = 0x4
        BPF_LINK_TYPE_NETNS                        = 0x5
        BPF_LINK_TYPE_XDP                          = 0x6
+       BPF_LINK_TYPE_PERF_EVENT                   = 0x7
+       BPF_LINK_TYPE_KPROBE_MULTI                 = 0x8
+       BPF_LINK_TYPE_STRUCT_OPS                   = 0x9
        BPF_ANY                                    = 0x0
        BPF_NOEXIST                                = 0x1
        BPF_EXIST                                  = 0x2
@@ -2733,6 +2754,7 @@ const (
        BPF_F_ZERO_CSUM_TX                         = 0x2
        BPF_F_DONT_FRAGMENT                        = 0x4
        BPF_F_SEQ_NUMBER                           = 0x8
+       BPF_F_TUNINFO_FLAGS                        = 0x10
        BPF_F_INDEX_MASK                           = 0xffffffff
        BPF_F_CURRENT_CPU                          = 0xffffffff
        BPF_F_CTXLEN_MASK                          = 0xfffff00000000
@@ -2747,6 +2769,7 @@ const (
        BPF_F_ADJ_ROOM_ENCAP_L4_GRE                = 0x8
        BPF_F_ADJ_ROOM_ENCAP_L4_UDP                = 0x10
        BPF_F_ADJ_ROOM_NO_CSUM_RESET               = 0x20
+       BPF_F_ADJ_ROOM_ENCAP_L2_ETH                = 0x40
        BPF_ADJ_ROOM_ENCAP_L2_MASK                 = 0xff
        BPF_ADJ_ROOM_ENCAP_L2_SHIFT                = 0x38
        BPF_F_SYSCTL_BASE_NAME                     = 0x1
@@ -2771,10 +2794,16 @@ const (
        BPF_LWT_ENCAP_SEG6                         = 0x0
        BPF_LWT_ENCAP_SEG6_INLINE                  = 0x1
        BPF_LWT_ENCAP_IP                           = 0x2
+       BPF_F_BPRM_SECUREEXEC                      = 0x1
+       BPF_F_BROADCAST                            = 0x8
+       BPF_F_EXCLUDE_INGRESS                      = 0x10
+       BPF_SKB_TSTAMP_UNSPEC                      = 0x0
+       BPF_SKB_TSTAMP_DELIVERY_MONO               = 0x1
        BPF_OK                                     = 0x0
        BPF_DROP                                   = 0x2
        BPF_REDIRECT                               = 0x7
        BPF_LWT_REROUTE                            = 0x80
+       BPF_FLOW_DISSECTOR_CONTINUE                = 0x81
        BPF_SOCK_OPS_RTO_CB_FLAG                   = 0x1
        BPF_SOCK_OPS_RETRANS_CB_FLAG               = 0x2
        BPF_SOCK_OPS_STATE_CB_FLAG                 = 0x4
@@ -2838,6 +2867,10 @@ const (
        BPF_FIB_LKUP_RET_UNSUPP_LWT                = 0x6
        BPF_FIB_LKUP_RET_NO_NEIGH                  = 0x7
        BPF_FIB_LKUP_RET_FRAG_NEEDED               = 0x8
+       BPF_MTU_CHK_SEGS                           = 0x1
+       BPF_MTU_CHK_RET_SUCCESS                    = 0x0
+       BPF_MTU_CHK_RET_FRAG_NEEDED                = 0x1
+       BPF_MTU_CHK_RET_SEGS_TOOBIG                = 0x2
        BPF_FD_TYPE_RAW_TRACEPOINT                 = 0x0
        BPF_FD_TYPE_TRACEPOINT                     = 0x1
        BPF_FD_TYPE_KPROBE                         = 0x2
@@ -2847,6 +2880,19 @@ const (
        BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG        = 0x1
        BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL    = 0x2
        BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP         = 0x4
+       BPF_CORE_FIELD_BYTE_OFFSET                 = 0x0
+       BPF_CORE_FIELD_BYTE_SIZE                   = 0x1
+       BPF_CORE_FIELD_EXISTS                      = 0x2
+       BPF_CORE_FIELD_SIGNED                      = 0x3
+       BPF_CORE_FIELD_LSHIFT_U64                  = 0x4
+       BPF_CORE_FIELD_RSHIFT_U64                  = 0x5
+       BPF_CORE_TYPE_ID_LOCAL                     = 0x6
+       BPF_CORE_TYPE_ID_TARGET                    = 0x7
+       BPF_CORE_TYPE_EXISTS                       = 0x8
+       BPF_CORE_TYPE_SIZE                         = 0x9
+       BPF_CORE_ENUMVAL_EXISTS                    = 0xa
+       BPF_CORE_ENUMVAL_VALUE                     = 0xb
+       BPF_CORE_TYPE_MATCHES                      = 0xc
 )
 
 const (
index 3723b2c224c8528f9dd4c7c6eadf52a4fa8784bf..9645900754f7b315696e900e860e7a430813c7fb 100644 (file)
@@ -405,7 +405,7 @@ func NewCallbackCDecl(fn interface{}) uintptr {
 //sys  VerQueryValue(block unsafe.Pointer, subBlock string, pointerToBufferPointer unsafe.Pointer, bufSize *uint32) (err error) = version.VerQueryValueW
 
 // Process Status API (PSAPI)
-//sys  EnumProcesses(processIds []uint32, bytesReturned *uint32) (err error) = psapi.EnumProcesses
+//sys  enumProcesses(processIds *uint32, nSize uint32, bytesReturned *uint32) (err error) = psapi.EnumProcesses
 //sys  EnumProcessModules(process Handle, module *Handle, cb uint32, cbNeeded *uint32) (err error) = psapi.EnumProcessModules
 //sys  EnumProcessModulesEx(process Handle, module *Handle, cb uint32, cbNeeded *uint32, filterFlag uint32) (err error) = psapi.EnumProcessModulesEx
 //sys  GetModuleInformation(process Handle, module Handle, modinfo *ModuleInfo, cb uint32) (err error) = psapi.GetModuleInformation
@@ -1354,6 +1354,17 @@ func SetsockoptIPv6Mreq(fd Handle, level, opt int, mreq *IPv6Mreq) (err error) {
        return syscall.EWINDOWS
 }
 
+func EnumProcesses(processIds []uint32, bytesReturned *uint32) error {
+       // EnumProcesses syscall expects the size parameter to be in bytes, but the code generated with mksyscall uses
+       // the length of the processIds slice instead. Hence, this wrapper function is added to fix the discrepancy.
+       var p *uint32
+       if len(processIds) > 0 {
+               p = &processIds[0]
+       }
+       size := uint32(len(processIds) * 4)
+       return enumProcesses(p, size, bytesReturned)
+}
+
 func Getpid() (pid int) { return int(GetCurrentProcessId()) }
 
 func FindFirstFile(name *uint16, data *Win32finddata) (handle Handle, err error) {
index a81ea2c70019349205d32a2323d18be7737a1412..566dd3e315f76dde23e95e6216ddb002af8c317a 100644 (file)
@@ -3516,12 +3516,8 @@ func EnumProcessModulesEx(process Handle, module *Handle, cb uint32, cbNeeded *u
        return
 }
 
-func EnumProcesses(processIds []uint32, bytesReturned *uint32) (err error) {
-       var _p0 *uint32
-       if len(processIds) > 0 {
-               _p0 = &processIds[0]
-       }
-       r1, _, e1 := syscall.Syscall(procEnumProcesses.Addr(), 3, uintptr(unsafe.Pointer(_p0)), uintptr(len(processIds)), uintptr(unsafe.Pointer(bytesReturned)))
+func enumProcesses(processIds *uint32, nSize uint32, bytesReturned *uint32) (err error) {
+       r1, _, e1 := syscall.Syscall(procEnumProcesses.Addr(), 3, uintptr(unsafe.Pointer(processIds)), uintptr(nSize), uintptr(unsafe.Pointer(bytesReturned)))
        if r1 == 0 {
                err = errnoErr(e1)
        }
index cb409f425c83793d6f4cefc8ea38b5a09fea190c..9cf8077e5a0bb14d3887e1ded3870fa38d5c8dc5 100644 (file)
@@ -17,7 +17,7 @@ github.com/google/pprof/third_party/svgpan
 # github.com/ianlancetaylor/demangle v0.0.0-20220319035150-800ac71e25c2
 ## explicit; go 1.12
 github.com/ianlancetaylor/demangle
-# golang.org/x/arch v0.2.1-0.20230208145055-40c19ba4a7c5
+# golang.org/x/arch v0.3.0
 ## explicit; go 1.17
 golang.org/x/arch/arm/armasm
 golang.org/x/arch/arm64/arm64asm
@@ -34,19 +34,19 @@ golang.org/x/mod/sumdb/dirhash
 golang.org/x/mod/sumdb/note
 golang.org/x/mod/sumdb/tlog
 golang.org/x/mod/zip
-# golang.org/x/sync v0.2.0
-## explicit
+# golang.org/x/sync v0.2.1-0.20230523185436-4966af63bb0c
+## explicit; go 1.17
 golang.org/x/sync/semaphore
-# golang.org/x/sys v0.8.0
+# golang.org/x/sys v0.8.1-0.20230523194307-b5c7a0975ddc
 ## explicit; go 1.17
 golang.org/x/sys/internal/unsafeheader
 golang.org/x/sys/plan9
 golang.org/x/sys/unix
 golang.org/x/sys/windows
-# golang.org/x/term v0.5.0
+# golang.org/x/term v0.8.0
 ## explicit; go 1.17
 golang.org/x/term
-# golang.org/x/tools v0.9.2-0.20230517205458-8b4b27bce44f
+# golang.org/x/tools v0.9.2-0.20230526183654-5974258e689a
 ## explicit; go 1.18
 golang.org/x/tools/cmd/bisect
 golang.org/x/tools/cover
index 321657d503618b7b90e602dad923d8f75007444e..c44f93757923a9f267ad5e89c88a852131c4b7f7 100644 (file)
@@ -3,11 +3,11 @@ module std
 go 1.21
 
 require (
-       golang.org/x/crypto v0.5.1-0.20230203195927-310bfa40f1e4
-       golang.org/x/net v0.10.0
+       golang.org/x/crypto v0.9.0
+       golang.org/x/net v0.10.1-0.20230525180353-f7250ea19d21
 )
 
 require (
-       golang.org/x/sys v0.8.0 // indirect
+       golang.org/x/sys v0.8.1-0.20230523194307-b5c7a0975ddc // indirect
        golang.org/x/text v0.9.0 // indirect
 )
index 9b02505733c41ea183d8aebe0dea47683d4a434a..3321fcff1b5dc03ca1067aaad71158a64fae51ed 100644 (file)
@@ -1,8 +1,8 @@
-golang.org/x/crypto v0.5.1-0.20230203195927-310bfa40f1e4 h1:8CmdfDrqo5/AGztF4Zk/aBNGTgL5dgcfPMmmvH1z8Lo=
-golang.org/x/crypto v0.5.1-0.20230203195927-310bfa40f1e4/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU=
-golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M=
-golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
-golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU=
-golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/crypto v0.9.0 h1:LF6fAI+IutBocDJ2OT0Q1g8plpYljMZ4+lty+dsqw3g=
+golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0=
+golang.org/x/net v0.10.1-0.20230525180353-f7250ea19d21 h1:jUMNhNY++lQOGP3xpA6+oKyHzRWdM7e6XBFppuDXEUw=
+golang.org/x/net v0.10.1-0.20230525180353-f7250ea19d21/go.mod h1:HUkFaVObNZHS2ti0M2K3nhgZkXc79hOnIQbGUtDSthg=
+golang.org/x/sys v0.8.1-0.20230523194307-b5c7a0975ddc h1:p4WpFbnzwh0EhIaGMueCjfMUkyWX6WQcJfxbS7GOQtQ=
+golang.org/x/sys v0.8.1-0.20230523194307-b5c7a0975ddc/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE=
 golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
index ed8d53ab3b98fad9ff268b86b9a45491a49204fd..ebc004a30dd8e6d825cc6adb16dcdfee09fba030 100644 (file)
@@ -4253,7 +4253,7 @@ func (s *http2Server) ServeConn(c net.Conn, opts *http2ServeConnOpts) {
        if s.NewWriteScheduler != nil {
                sc.writeSched = s.NewWriteScheduler()
        } else {
-               sc.writeSched = http2NewPriorityWriteScheduler(nil)
+               sc.writeSched = http2newRoundRobinWriteScheduler()
        }
 
        // These start at the RFC-specified defaults. If there is a higher
@@ -6246,7 +6246,7 @@ type http2requestBody struct {
        conn          *http2serverConn
        closeOnce     sync.Once  // for use by Close only
        sawEOF        bool       // for use by Read only
-       pipe          *http2pipe // non-nil if we have a HTTP entity message body
+       pipe          *http2pipe // non-nil if we have an HTTP entity message body
        needsContinue bool       // need to send a 100-continue
 }
 
@@ -6386,7 +6386,8 @@ func (rws *http2responseWriterState) writeChunk(p []byte) (n int, err error) {
                                clen = ""
                        }
                }
-               if clen == "" && rws.handlerDone && http2bodyAllowedForStatus(rws.status) && (len(p) > 0 || !isHeadResp) {
+               _, hasContentLength := rws.snapHeader["Content-Length"]
+               if !hasContentLength && clen == "" && rws.handlerDone && http2bodyAllowedForStatus(rws.status) && (len(p) > 0 || !isHeadResp) {
                        clen = strconv.Itoa(len(p))
                }
                _, hasContentType := rws.snapHeader["Content-Type"]
@@ -6591,7 +6592,7 @@ func (w *http2responseWriter) FlushError() error {
                err = rws.bw.Flush()
        } else {
                // The bufio.Writer won't call chunkWriter.Write
-               // (writeChunk with zero bytes, so we have to do it
+               // (writeChunk with zero bytes), so we have to do it
                // ourselves to force the HTTP response header and/or
                // final DATA frame (with END_STREAM) to be sent.
                _, err = http2chunkWriter{rws}.Write(nil)
@@ -8289,8 +8290,8 @@ func (cc *http2ClientConn) RoundTrip(req *Request) (*Response, error) {
 
        cancelRequest := func(cs *http2clientStream, err error) error {
                cs.cc.mu.Lock()
-               defer cs.cc.mu.Unlock()
                cs.abortStreamLocked(err)
+               bodyClosed := cs.reqBodyClosed
                if cs.ID != 0 {
                        // This request may have failed because of a problem with the connection,
                        // or for some unrelated reason. (For example, the user might have canceled
@@ -8305,6 +8306,23 @@ func (cc *http2ClientConn) RoundTrip(req *Request) (*Response, error) {
                        // will not help.
                        cs.cc.doNotReuse = true
                }
+               cs.cc.mu.Unlock()
+               // Wait for the request body to be closed.
+               //
+               // If nothing closed the body before now, abortStreamLocked
+               // will have started a goroutine to close it.
+               //
+               // Closing the body before returning avoids a race condition
+               // with net/http checking its readTrackingBody to see if the
+               // body was read from or closed. See golang/go#60041.
+               //
+               // The body is closed in a separate goroutine without the
+               // connection mutex held, but dropping the mutex before waiting
+               // will keep us from holding it indefinitely if the body
+               // close is slow for some reason.
+               if bodyClosed != nil {
+                       <-bodyClosed
+               }
                return err
        }
 
@@ -8920,7 +8938,7 @@ func (cc *http2ClientConn) encodeHeaders(req *Request, addGzipHeader bool, trail
                // 8.1.2.3 Request Pseudo-Header Fields
                // The :path pseudo-header field includes the path and query parts of the
                // target URI (the path-absolute production and optionally a '?' character
-               // followed by the query production (see Sections 3.3 and 3.4 of
+               // followed by the query productionsee Sections 3.3 and 3.4 of
                // [RFC3986]).
                f(":authority", host)
                m := req.Method
@@ -10728,7 +10746,8 @@ func (wr *http2FrameWriteRequest) replyToWriter(err error) {
 
 // writeQueue is used by implementations of WriteScheduler.
 type http2writeQueue struct {
-       s []http2FrameWriteRequest
+       s          []http2FrameWriteRequest
+       prev, next *http2writeQueue
 }
 
 func (q *http2writeQueue) empty() bool { return len(q.s) == 0 }
@@ -11306,3 +11325,112 @@ func (ws *http2randomWriteScheduler) Pop() (http2FrameWriteRequest, bool) {
        }
        return http2FrameWriteRequest{}, false
 }
+
+type http2roundRobinWriteScheduler struct {
+       // control contains control frames (SETTINGS, PING, etc.).
+       control http2writeQueue
+
+       // streams maps stream ID to a queue.
+       streams map[uint32]*http2writeQueue
+
+       // stream queues are stored in a circular linked list.
+       // head is the next stream to write, or nil if there are no streams open.
+       head *http2writeQueue
+
+       // pool of empty queues for reuse.
+       queuePool http2writeQueuePool
+}
+
+// newRoundRobinWriteScheduler constructs a new write scheduler.
+// The round robin scheduler priorizes control frames
+// like SETTINGS and PING over DATA frames.
+// When there are no control frames to send, it performs a round-robin
+// selection from the ready streams.
+func http2newRoundRobinWriteScheduler() http2WriteScheduler {
+       ws := &http2roundRobinWriteScheduler{
+               streams: make(map[uint32]*http2writeQueue),
+       }
+       return ws
+}
+
+func (ws *http2roundRobinWriteScheduler) OpenStream(streamID uint32, options http2OpenStreamOptions) {
+       if ws.streams[streamID] != nil {
+               panic(fmt.Errorf("stream %d already opened", streamID))
+       }
+       q := ws.queuePool.get()
+       ws.streams[streamID] = q
+       if ws.head == nil {
+               ws.head = q
+               q.next = q
+               q.prev = q
+       } else {
+               // Queues are stored in a ring.
+               // Insert the new stream before ws.head, putting it at the end of the list.
+               q.prev = ws.head.prev
+               q.next = ws.head
+               q.prev.next = q
+               q.next.prev = q
+       }
+}
+
+func (ws *http2roundRobinWriteScheduler) CloseStream(streamID uint32) {
+       q := ws.streams[streamID]
+       if q == nil {
+               return
+       }
+       if q.next == q {
+               // This was the only open stream.
+               ws.head = nil
+       } else {
+               q.prev.next = q.next
+               q.next.prev = q.prev
+               if ws.head == q {
+                       ws.head = q.next
+               }
+       }
+       delete(ws.streams, streamID)
+       ws.queuePool.put(q)
+}
+
+func (ws *http2roundRobinWriteScheduler) AdjustStream(streamID uint32, priority http2PriorityParam) {}
+
+func (ws *http2roundRobinWriteScheduler) Push(wr http2FrameWriteRequest) {
+       if wr.isControl() {
+               ws.control.push(wr)
+               return
+       }
+       q := ws.streams[wr.StreamID()]
+       if q == nil {
+               // This is a closed stream.
+               // wr should not be a HEADERS or DATA frame.
+               // We push the request onto the control queue.
+               if wr.DataSize() > 0 {
+                       panic("add DATA on non-open stream")
+               }
+               ws.control.push(wr)
+               return
+       }
+       q.push(wr)
+}
+
+func (ws *http2roundRobinWriteScheduler) Pop() (http2FrameWriteRequest, bool) {
+       // Control and RST_STREAM frames first.
+       if !ws.control.empty() {
+               return ws.control.shift(), true
+       }
+       if ws.head == nil {
+               return http2FrameWriteRequest{}, false
+       }
+       q := ws.head
+       for {
+               if wr, ok := q.consume(math.MaxInt32); ok {
+                       ws.head = q.next
+                       return wr, true
+               }
+               q = q.next
+               if q == ws.head {
+                       break
+               }
+       }
+       return http2FrameWriteRequest{}, false
+}
index 3141a7f1b986c27c24b746c562d0b3e6a53ed6dd..6fc2838a3fb853c4ac308ed30a2ff6144630fd6a 100644 (file)
@@ -431,6 +431,14 @@ func (s *String) readBase128Int(out *int) bool {
                }
                ret <<= 7
                b := s.read(1)[0]
+
+               // ITU-T X.690, section 8.19.2:
+               // The subidentifier shall be encoded in the fewest possible octets,
+               // that is, the leading octet of the subidentifier shall not have the value 0x80.
+               if i == 0 && b == 0x80 {
+                       return false
+               }
+
                ret |= int(b & 0x7f)
                if b&0x80 == 0 {
                        *out = ret
index ffdf19d5d3e9f6960dc6db533d0b06ac18ae356e..1577d4a19db98fef46d60aee018cba47cfb85666 100644 (file)
@@ -260,9 +260,11 @@ var (
        errReserved           = errors.New("segment prefix is reserved")
        errTooManyPtr         = errors.New("too many pointers (>10)")
        errInvalidPtr         = errors.New("invalid pointer")
+       errInvalidName        = errors.New("invalid dns name")
        errNilResouceBody     = errors.New("nil resource body")
        errResourceLen        = errors.New("insufficient data for resource body length")
        errSegTooLong         = errors.New("segment length too long")
+       errNameTooLong        = errors.New("name too long")
        errZeroSegLen         = errors.New("zero length segment")
        errResTooLong         = errors.New("resource length too long")
        errTooManyQuestions   = errors.New("too many Questions to pack (>65535)")
@@ -1728,7 +1730,7 @@ const (
 //
 // The provided extRCode must be an extended RCode.
 func (h *ResourceHeader) SetEDNS0(udpPayloadLen int, extRCode RCode, dnssecOK bool) error {
-       h.Name = Name{Data: [nameLen]byte{'.'}, Length: 1} // RFC 6891 section 6.1.2
+       h.Name = Name{Data: [255]byte{'.'}, Length: 1} // RFC 6891 section 6.1.2
        h.Type = TypeOPT
        h.Class = Class(udpPayloadLen)
        h.TTL = uint32(extRCode) >> 4 << 24
@@ -1888,21 +1890,21 @@ func unpackBytes(msg []byte, off int, field []byte) (int, error) {
        return newOff, nil
 }
 
-const nameLen = 255
+const nonEncodedNameMax = 254
 
 // A Name is a non-encoded domain name. It is used instead of strings to avoid
 // allocations.
 type Name struct {
-       Data   [nameLen]byte // 255 bytes
+       Data   [255]byte
        Length uint8
 }
 
 // NewName creates a new Name from a string.
 func NewName(name string) (Name, error) {
-       if len(name) > nameLen {
+       n := Name{Length: uint8(len(name))}
+       if len(name) > len(n.Data) {
                return Name{}, errCalcLen
        }
-       n := Name{Length: uint8(len(name))}
        copy(n.Data[:], name)
        return n, nil
 }
@@ -1936,6 +1938,10 @@ func (n *Name) GoString() string {
 func (n *Name) pack(msg []byte, compression map[string]int, compressionOff int) ([]byte, error) {
        oldMsg := msg
 
+       if n.Length > nonEncodedNameMax {
+               return nil, errNameTooLong
+       }
+
        // Add a trailing dot to canonicalize name.
        if n.Length == 0 || n.Data[n.Length-1] != '.' {
                return oldMsg, errNonCanonicalName
@@ -2029,6 +2035,15 @@ Loop:
                        if endOff > len(msg) {
                                return off, errCalcLen
                        }
+
+                       // Reject names containing dots.
+                       // See issue golang/go#56246
+                       for _, v := range msg[currOff:endOff] {
+                               if v == '.' {
+                                       return off, errInvalidName
+                               }
+                       }
+
                        name = append(name, msg[currOff:endOff]...)
                        name = append(name, '.')
                        currOff = endOff
@@ -2057,8 +2072,8 @@ Loop:
        if len(name) == 0 {
                name = append(name, '.')
        }
-       if len(name) > len(n.Data) {
-               return off, errCalcLen
+       if len(name) > nonEncodedNameMax {
+               return off, errNameTooLong
        }
        n.Length = uint8(len(name))
        if ptr == 0 {
index fe545966b615057304bdf7f287b94f4a1886e21d..55db853efbec4e889f8c6b16f3b4463e1b28a9b5 100644 (file)
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build 386 || amd64 || amd64p32 || alpha || arm || arm64 || loong64 || mipsle || mips64le || mips64p32le || nios2 || ppc64le || riscv || riscv64 || sh
-// +build 386 amd64 amd64p32 alpha arm arm64 loong64 mipsle mips64le mips64p32le nios2 ppc64le riscv riscv64 sh
+//go:build 386 || amd64 || amd64p32 || alpha || arm || arm64 || loong64 || mipsle || mips64le || mips64p32le || nios2 || ppc64le || riscv || riscv64 || sh || wasm
+// +build 386 amd64 amd64p32 alpha arm arm64 loong64 mipsle mips64le mips64p32le nios2 ppc64le riscv riscv64 sh wasm
 
 package cpu
 
index fd49affcf45472ce7ea3cfb9c3746cbabcc96222..c084ed85dacb5746f1ba36ffb322075fa93eee28 100644 (file)
@@ -1,4 +1,4 @@
-# golang.org/x/crypto v0.5.1-0.20230203195927-310bfa40f1e4
+# golang.org/x/crypto v0.9.0
 ## explicit; go 1.17
 golang.org/x/crypto/chacha20
 golang.org/x/crypto/chacha20poly1305
@@ -7,7 +7,7 @@ golang.org/x/crypto/cryptobyte/asn1
 golang.org/x/crypto/hkdf
 golang.org/x/crypto/internal/alias
 golang.org/x/crypto/internal/poly1305
-# golang.org/x/net v0.10.0
+# golang.org/x/net v0.10.1-0.20230525180353-f7250ea19d21
 ## explicit; go 1.17
 golang.org/x/net/dns/dnsmessage
 golang.org/x/net/http/httpguts
@@ -17,7 +17,7 @@ golang.org/x/net/idna
 golang.org/x/net/lif
 golang.org/x/net/nettest
 golang.org/x/net/route
-# golang.org/x/sys v0.8.0
+# golang.org/x/sys v0.8.1-0.20230523194307-b5c7a0975ddc
 ## explicit; go 1.17
 golang.org/x/sys/cpu
 # golang.org/x/text v0.9.0