syz_structs

package
v0.0.0-...-4e6bda9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 20, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	EnabledSyscalls = map[string]bool{}

	Unsupported = map[string]bool{
		"brk": true,

		"":       true,
		"execve": true,
		"access": true,

		"gettimeofday": true,
		"kill":         true,

		"arch_prctl": true,

		"getcwd":        true,
		"setdomainname": true,
		"reboot":        true,
		"getppid":       true,
		"umask":         true,
		"adjtimex":      true,

		"rt_sigprocmask":         true,
		"rt_sigaction":           true,
		"sysfs":                  true,
		"chdir":                  true,
		"clone":                  true,
		"newfstatat":             true,
		"getsid":                 true,
		"getcpu":                 true,
		"sched_get_priority_min": true,
		"sched_get_priority_max": true,
	}

	VMACall = map[string]bool{
		"mmap":             true,
		"munmap":           true,
		"mremap":           true,
		"msync":            true,
		"mprotect":         true,
		"remap_file_pages": true,
		"shmat":            true,
		"mlock":            true,
		"munlock":          true,
		"madvise":          true,
	}

	Accept_labels = map[string]string{
		"fd":            "",
		"sock":          "",
		"sock_alg":      "$alg",
		"sock_in":       "$inet",
		"sock_in6":      "$inet6",
		"sock_netrom":   "$netrom",
		"sock_nfc_llcp": "$nfc_llcp",
		"sock_sctp":     "$sctp",
		"sock_unix":     "$unix",
		"sock_netlink":  "$inet6",
	}

	Bind_labels = map[string]string{
		"fd":             "",
		"sock":           "",
		"sock_alg":       "$alg",
		"sock_bt_hci":    "$bt_hci",
		"sock_bt_l2cap":  "$bt_l2cap",
		"sock_bt_rfcomm": "$bt_rfcomm",
		"sock_bt_sco":    "$bt_sco",
		"sock_in":        "$inet",
		"sock_in6":       "$inet6",
		"sock_netlink":   "$netlink",
		"sock_netrom":    "$netrom",
		"sock_nfc_llcp":  "$nfc_llcp",
		"sock_sctp":      "$sctp",
		"sock_unix":      "$unix",
		"AF_INET":        "$inet",
		"AF_INET6":       "$inet6",
		"sock_packet":    "$packet",
	}

	Structs_with_reordered_fields = map[string][]int{
		"sockaddr_in6": {0, 1, 3, 2, 4},
	}

	Connect_labels = map[string]string{
		"fd":             "",
		"sock":           "",
		"sock_bt_l2cap":  "$bt_l2cap",
		"sock_bt_rfcomm": "$bt_rfcomm",
		"sock_bt_sco":    "$bt_sco",
		"sock_in":        "$inet",
		"sock_in6":       "$inet6",
		"sock_netlink":   "$netlink",
		"sock_netrom":    "$netrom",
		"sock_nfc_llcp":  "$nfc_llcp",
		"sock_nfc_raw":   "$nfc_raw",
		"sock_sctp":      "$sctp",
		"sock_unix":      "$unix",
		"AF_INET":        "$inet",
		"AF_INET6":       "$inet6",
	}

	Bpf_labels = map[string]string{
		"BPF_PROG_LOAD": "$PROG_LOAD",
	}

	Setsockopt_labels = map[Pair]string{}/* 158 elements not displayed */

	Getsockopt_labels = map[Pair]string{}/* 155 elements not displayed */

	Getsockname_labels = map[string]string{
		"fd":           "",
		"sock":         "",
		"sock_in":      "$inet",
		"sock_in6":     "$inet6",
		"sock_netlink": "$netlink",
		"sock_netrom":  "$netrom",
		"sock_sctp":    "$sctp",
		"sock_unix":    "$unix",
	}

	SocketLevel_map = map[string]string{
		"SOL_SOCKET": "SOL_SOCKET",
		"SOL_IPV6":   "IPPROTO_IPV6",
		"SOL_ICMPV6": "SOL_ICMPV6",
		"SOL_TCP":    "IPPROTO_TCP",
		"SOL_RAW":    "IPPROTO_ICMP",
		"SOL_PACKET": "SOL_PACKET",
		"SOL_IP":     "IPPROTO_IP",
		"SOL_SCTP":   "SOL_SCTP",
	}

	Sendto_labels = map[string]string{
		"fd":           "",
		"sock":         "",
		"sock_in":      "$inet",
		"sock_in6":     "$inet6",
		"sock_sctp":    "$sctp",
		"sock_unix":    "$unix",
		"sock_netlink": "$inet6",
	}

	Sendmsg_labels = map[string]string{
		"fd":            "",
		"sock":          "",
		"sock_in6":      "",
		"sock_in":       "",
		"sock_sctp":     "$sctp",
		"sock_unix":     "$unix",
		"sock_algconn":  "$alg",
		"sock_kcm":      "$kcm",
		"sock_netlink":  "$netlink",
		"sock_netrom":   "$netrom",
		"sock_nfc_llcp": "$nfc_llcp",
	}

	Recvfrom_labels = map[string]string{
		"fd":           "",
		"sock":         "",
		"sock_in":      "$inet",
		"sock_in6":     "$inet6",
		"sock_sctp":    "$sctp",
		"sock_unix":    "$unix",
		"sock_netlink": "$inet6",
		"sock_packet":  "$packet",
	}

	Ioctl_map = map[string]string{
		"FIONBIO":         "int_in",
		"FIOASYNC":        "int_in",
		"FS_IOC_GETFLAGS": "int_out",
		"FS_IOC_SETFLAGS": "int_in",
		"SIOCGIFINDEX":    "sock_SIOCGIFINDEX",
	}

	Socket_labels_pair = map[Pair]string{
		Pair{"AF_INET", "SOCK_STREAM"}:  "$inet",
		Pair{"AF_INET", "SOCK_DGRAM"}:   "$inet",
		Pair{"AF_INET", "SOCK_STREAM"}:  "$inet",
		Pair{"AF_INET", "SOCK_STREAM"}:  "$inet",
		Pair{"AF_INET", "SOCK_STREAM"}:  "$inet",
		Pair{"AF_INET", "SOCK_STREAM"}:  "$inet",
		Pair{"AF_INET", "SOCK_STREAM"}:  "$inet",
		Pair{"AF_INET", "SOCK_STREAM"}:  "$inet",
		Pair{"AF_INET", "SOCK_STREAM"}:  "$inet",
		Pair{"AF_INET", "SOCK_STREAM"}:  "$inet",
		Pair{"AF_INET", "SOCK_RAW"}:     "$inet_icmp_raw",
		Pair{"AF_PACKET", "SOCK_RAW"}:   "$packet",
		Pair{"AF_PACKET", "SOCK_DGRAM"}: "$packet",
		Pair{"AF_INET", "SOL_SCTP"}:     "$inet_sctp",
	}
	Socket_labels = map[string]string{
		"AF_INET":    "$inet",
		"AF_INET6":   "$inet6",
		"AF_KCM":     "$kcm",
		"AF_UNIX":    "$unix",
		"AF_NETLINK": "$netlink",
		"AF_PACKET":  "$packet",
	}

	Fcntl_labels = map[string]string{
		"F_DUPFD":         "$dupfd",
		"F_DUPFD_CLOEXEC": "$dupfd",
		"F_GETFD":         "$getflags",
		"F_GETFL":         "$getflags",
		"F_GETSIG":        "$getflags",
		"F_GETLEASE":      "$getflags",
		"F_GETPIPE_SZ":    "$getflags",
		"F_GET_SEALS":     "$getflags",
		"F_SETFD":         "$setflags",
		"F_SETFL":         "$setstatus",
		"F_SETLK":         "$lock",
		"F_SETLKW":        "$lock",
		"F_GETLK":         "$lock",
		"F_GETOWN":        "$getown",
		"F_SETOWN":        "$setown",
		"F_GETOWN_EX":     "$getownex",
		"F_SETOWN_EX":     "$setownex",
		"F_SETSIG":        "$setsig",
		"F_SETLEASE":      "$setlease",
		"DN_MULTISHOT":    "$notify",
		"DN_ACCESS":       "$notify",
		"DN_MODIFY":       "$notify",
		"DN_CREATE":       "$notify",
		"DN_DELETE":       "$notify",
		"DN_RENAME":       "$notify",
		"DN_ATTRIB":       "$notify",
		"F_SETPIPE_SZ":    "$setpipe",
		"F_ADD_SEALS":     "$addseals",
	}

	Keyctl_labels = map[string]string{
		"KEYCTL_GET_KEYRING_ID":       "$get_keyring_id",
		"KEYCTL_JOIN_SESSION_KEYRING": "$join",
		"KEYCTL_UPDATE":               "$update",
		"KEYCTL_REVOKE":               "$revoke",
		"KEYCTL_DESCRIBE":             "$describe",
		"KEYCTL_CLEAR":                "$clear",
		"KEYCTL_LINK":                 "$link",
		"KEYCTL_UNLINK":               "$unlink",
		"KEYCTL_SEARCH":               "$search",
		"KEYCTL_READ":                 "$read",
		"KEYCTL_CHOWN":                "$chown",
		"KEYCTL_SETPERM":              "$setperm",
		"KEYCTL_INSTANTIATE":          "$instantiate",
		"KEYCTL_NEGATE":               "$negate",
		"KEYCTL_SET_REQKEY_KEYRING":   "$set_reqkey_keyring",
		"KEYCTL_SET_TIMEOUT":          "$set_timeout",
		"KEYCTL_ASSUME_AUTHORITY":     "$assume_authority",
		"KEYCTL_GET_SECURITY":         "$get_security",
		"KEYCTL_SESSION_TO_PARENT":    "$session_to_parent",
		"KEYCTL_REJECT":               "$reject",
		"KEYCTL_INSTANTIATE_IOV":      "$instantiate_iov",
		"KEYCTL_INVALIDATE":           "$invalidate",
		"KEYCTL_GET_PERSISTENT":       "$get_persistent",
	}

	Prctl_labels = map[string]string{
		"PR_GET_DUMPABLE":             "$void",
		"PR_GET_KEEPCAPS":             "$void",
		"PR_GET_NO_NEW_PRIVS":         "$void",
		"PR_GET_SECCOMP":              "$void",
		"PR_GET_SECUREBITS":           "$void",
		"PR_GET_TIMERSLACK":           "$void",
		"PR_GET_TIMING":               "$void",
		"PR_TASK_PERF_EVENTS_DISABLE": "$void",
		"PR_TASK_PERF_EVENTS_ENABLE":  "$void",
		"PR_MCE_KILL_GE":              "$void",
		"PR_CAPBSET_READ":             "$intptr",
		"PR_CAPBSET_DROP":             "$intptr",
		"PR_SET_CHILD_SUBREAPER":      "$intptr",
		"PR_SET_DUMPABLE":             "$intptr",
		"PR_SET_FPEMU":                "$intptr",
		"PR_SET_KEEPCAPS":             "$intptr",
		"PR_SET_NO_NEW_PRIVS":         "$intptr",
		"PR_SET_PDEATHSIG":            "$intptr",
		"PR_SET_SECUREBITS":           "$intptr",
		"PR_SET_TIMERSLACK":           "$intptr",
		"PR_SET_TIMING":               "$intptr",
		"PR_SET_TSC":                  "$intptr",
		"PR_SET_UNALIGN":              "$intptr",
		"PR_MCE_KILL":                 "$intptr",
		"PR_GET_CHILD_SUBREAPER":      "$getreaper",
		"PR_GET_ENDIAN":               "$getreaper",
		"PR_GET_FPEMU":                "$getreaper",
		"PR_GET_FPEXC":                "$getreaper",
		"PR_GET_PDEATHSIG":            "$getreaper",
		"PR_GET_TID_ADDRESS":          "$getreaper",
		"PR_GET_TSC":                  "$getreaper",
		"PR_GET_UNALIGN":              "$getreaper",
		"PR_SET_ENDIAN":               "$setendian",
		"PR_SET_FPEXC":                "$setfpexc",
		"PR_SET_NAME":                 "$setname",
		"PR_GET_NAME":                 "$getname",
		"PR_SET_PTRACER":              "$setptracer",
	}

	Special_Consts = map[string]uint64{
		"_LINUX_CAPABILITY_VERSION_1": uint64(0x19980330),
		"_LINUX_CAPABILITY_VERSION_2": uint64(0x20071026),
		"_LINUX_CAPABILITY_VERSION_3": uint64(0x20080522),
	}

	Macros = []string{"makedev"}

	MacroExpand_map = map[string]func(string) string{
		"makedev": MakeDev,
	}
)

Functions

func Htonl

func Htonl(port uint32) uint32

func Htons

func Htons(port uint16) uint16

func Inet_addr

func Inet_addr(ipaddr string) uint32

func MakeDev

func MakeDev(macro string) string

Types

type Pair

type Pair struct {
	A string
	B string
}

type SocketDesc

type SocketDesc struct {
	Domain string
	Type   string
	Proto  string
}

type Stack

type Stack []byte

func (Stack) Pop

func (s Stack) Pop() (Stack, byte)

func (Stack) Push

func (s Stack) Push(c byte) Stack

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL