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 files33
notkmhn/cve-2022-21449-tls-pocRevision fa239eebae2b
- ↑..Parent directory
- asan1_fail.go
- asan2_fail.go
- asan3_fail.go
- asan4_fail.go
- asan5_fail.go
- asan_unsafe_fail1.go
- asan_unsafe_fail2.go
- asan_unsafe_fail3.go
- asan_useAfterReturn.go
- msan.go
- msan2.go
- msan2_cmsan.go
- msan3.go
- msan4.go
- msan5.go
- msan6.go
- msan7.go
- msan8.go
- msan_fail.go
- msan_shared.go
- tsan.go
- tsan10.go
- tsan11.go
- tsan12.go
- tsan2.go
- tsan3.go
- tsan4.go
- tsan5.go
- tsan6.go
- tsan7.go
- tsan8.go
- tsan9.go
- tsan_shared.go
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
go/misc/cgo/testsanitizers/testdata/tsan_shared.go
Go · 1,494 bytes// Copyright 2017 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.
package main
// This program failed with SIGSEGV when run under the C/C++ ThreadSanitizer.
// The Go runtime had re-registered the C handler with the wrong flags due to a
// typo, resulting in null pointers being passed for the info and context
// parameters to the handler.
/*
#cgo CFLAGS: -fsanitize=thread
#cgo LDFLAGS: -fsanitize=thread
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ucontext.h>
void check_params(int signo, siginfo_t *info, void *context) {
ucontext_t* uc = (ucontext_t*)(context);
if (info->si_signo != signo) {
fprintf(stderr, "info->si_signo does not match signo.\n");
abort();
}
if (uc->uc_stack.ss_size == 0) {
fprintf(stderr, "uc_stack has size 0.\n");
abort();
}
}
// Set up the signal handler in a high priority constructor, so
// that it is installed before the Go code starts.
static void register_handler(void) __attribute__ ((constructor (200)));
static void register_handler() {
struct sigaction sa;
memset(&sa, 0, sizeof(sa));
sigemptyset(&sa.sa_mask);
sa.sa_flags = SA_SIGINFO;
sa.sa_sigaction = check_params;
if (sigaction(SIGUSR1, &sa, NULL) != 0) {
perror("failed to register SIGUSR1 handler");
exit(EXIT_FAILURE);
}
}
*/
import "C"
import "syscall"
func init() {
C.raise(C.int(syscall.SIGUSR1))
}
func main() {}