Exploit databaseDownload repository ZIP
GH-8958357e96f9d8f8c98383150c404283
notkmhn/cve-2022-21449-tls-poc
Sources for CVE-2022-21449
14 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files540
notkmhn/cve-2022-21449-tls-pocRevision fa239eebae2b
- ↑..Parent directory
- asan/
- cgo/
- debug/
- internal/
- metrics/
- msan/
- pprof/
- race/
- testdata/
- trace/
- HACKING.md
- Makefile
- alg.go
- asan.go
- asan0.go
- asan_amd64.s
- asan_arm64.s
- asm.s
- asm_386.s
- asm_amd64.h
- asm_amd64.s
- asm_arm.s
- asm_arm64.s
- asm_mips64x.s
- asm_mipsx.s
- asm_ppc64x.h
- asm_ppc64x.s
- asm_riscv64.s
- asm_s390x.s
- asm_wasm.s
- atomic_arm64.s
- atomic_mips64x.s
- atomic_mipsx.s
- atomic_pointer.go
- atomic_ppc64x.s
- atomic_riscv64.s
- auxv_none.go
- cgo.go
- cgo_mmap.go
- cgo_ppc64x.go
- cgo_sigaction.go
- cgocall.go
- cgocallback.go
- cgocheck.go
- chan.go
- checkptr.go
- compiler.go
- complex.go
- cpuflags.go
- cpuflags_amd64.go
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
go/src/runtime/hash32.go
Go · 1,622 bytes// Copyright 2014 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Hashing algorithm inspired by
// wyhash: https://github.com/wangyi-fudan/wyhash/blob/ceb019b530e2c1c14d70b79bfa2bc49de7d95bc1/Modern%20Non-Cryptographic%20Hash%20Function%20and%20Pseudorandom%20Number%20Generator.pdf
//go:build 386 || arm || mips || mipsle
package runtime
import "unsafe"
func memhash32Fallback(p unsafe.Pointer, seed uintptr) uintptr {
a, b := mix32(uint32(seed), uint32(4^hashkey[0]))
t := readUnaligned32(p)
a ^= t
b ^= t
a, b = mix32(a, b)
a, b = mix32(a, b)
return uintptr(a ^ b)
}
func memhash64Fallback(p unsafe.Pointer, seed uintptr) uintptr {
a, b := mix32(uint32(seed), uint32(8^hashkey[0]))
a ^= readUnaligned32(p)
b ^= readUnaligned32(add(p, 4))
a, b = mix32(a, b)
a, b = mix32(a, b)
return uintptr(a ^ b)
}
func memhashFallback(p unsafe.Pointer, seed, s uintptr) uintptr {
a, b := mix32(uint32(seed), uint32(s^hashkey[0]))
if s == 0 {
return uintptr(a ^ b)
}
for ; s > 8; s -= 8 {
a ^= readUnaligned32(p)
b ^= readUnaligned32(add(p, 4))
a, b = mix32(a, b)
p = add(p, 8)
}
if s >= 4 {
a ^= readUnaligned32(p)
b ^= readUnaligned32(add(p, s-4))
} else {
t := uint32(*(*byte)(p))
t |= uint32(*(*byte)(add(p, s>>1))) << 8
t |= uint32(*(*byte)(add(p, s-1))) << 16
b ^= t
}
a, b = mix32(a, b)
a, b = mix32(a, b)
return uintptr(a ^ b)
}
func mix32(a, b uint32) (uint32, uint32) {
c := uint64(a^uint32(hashkey[1])) * uint64(b^uint32(hashkey[2]))
return uint32(c), uint32(c >> 32)
}