Add taint-tracking for package net

This commit is contained in:
Slavomir
2020-09-12 12:44:35 +02:00
parent fee596ac83
commit fa04d5a74d
3 changed files with 1052 additions and 0 deletions

View File

@@ -29,6 +29,7 @@ import semmle.go.frameworks.stdlib.EncodingPem
import semmle.go.frameworks.stdlib.EncodingXml
import semmle.go.frameworks.stdlib.Html
import semmle.go.frameworks.stdlib.HtmlTemplate
import semmle.go.frameworks.stdlib.Net
import semmle.go.frameworks.stdlib.Path
import semmle.go.frameworks.stdlib.PathFilepath
import semmle.go.frameworks.stdlib.Reflect

View File

@@ -0,0 +1,258 @@
/**
* Provides classes modeling security-relevant aspects of the `net` package.
*/
import go
/** Provides models of commonly used functions in the `net` package. */
module Net {
private class FunctionModels extends TaintTracking::FunctionModel {
FunctionInput inp;
FunctionOutput outp;
FunctionModels() {
// signature: func FileConn(f *os.File) (c Conn, err error)
hasQualifiedName("net", "FileConn") and
(
inp.isParameter(0) and outp.isResult(0)
or
inp.isResult(0) and outp.isParameter(0)
)
or
// signature: func FilePacketConn(f *os.File) (c PacketConn, err error)
hasQualifiedName("net", "FilePacketConn") and
(
inp.isParameter(0) and outp.isResult(0)
or
inp.isResult(0) and outp.isParameter(0)
)
or
// signature: func JoinHostPort(host string, port string) string
hasQualifiedName("net", "JoinHostPort") and
(inp.isParameter(_) and outp.isResult())
or
// signature: func ParseCIDR(s string) (IP, *IPNet, error)
hasQualifiedName("net", "ParseCIDR") and
(inp.isParameter(0) and outp.isResult([0, 1]))
or
// signature: func ParseIP(s string) IP
hasQualifiedName("net", "ParseIP") and
(inp.isParameter(0) and outp.isResult())
or
// signature: func ParseMAC(s string) (hw HardwareAddr, err error)
hasQualifiedName("net", "ParseMAC") and
(inp.isParameter(0) and outp.isResult(0))
or
// signature: func Pipe() (Conn, Conn)
hasQualifiedName("net", "Pipe") and
(
inp.isResult(0) and outp.isResult(1)
or
inp.isResult(1) and outp.isResult(0)
)
or
// signature: func SplitHostPort(hostport string) (host string, port string, err error)
hasQualifiedName("net", "SplitHostPort") and
(inp.isParameter(0) and outp.isResult([0, 1]))
}
override predicate hasTaintFlow(FunctionInput input, FunctionOutput output) {
input = inp and output = outp
}
}
private class MethodModels extends TaintTracking::FunctionModel, Method {
FunctionInput inp;
FunctionOutput outp;
MethodModels() {
// signature: func (*Buffers).Read(p []byte) (n int, err error)
this.hasQualifiedName("net", "Buffers", "Read") and
(inp.isReceiver() and outp.isParameter(0))
or
// signature: func (*Buffers).WriteTo(w io.Writer) (n int64, err error)
this.hasQualifiedName("net", "Buffers", "WriteTo") and
(inp.isReceiver() and outp.isParameter(0))
or
// signature: func (IP).MarshalText() ([]byte, error)
this.hasQualifiedName("net", "IP", "MarshalText") and
(inp.isReceiver() and outp.isResult(0))
or
// signature: func (IP).To16() IP
this.hasQualifiedName("net", "IP", "To16") and
(inp.isReceiver() and outp.isResult())
or
// signature: func (IP).To4() IP
this.hasQualifiedName("net", "IP", "To4") and
(inp.isReceiver() and outp.isResult())
or
// signature: func (*IP).UnmarshalText(text []byte) error
this.hasQualifiedName("net", "IP", "UnmarshalText") and
(inp.isParameter(0) and outp.isReceiver())
or
// signature: func (*IPConn).ReadFrom(b []byte) (int, Addr, error)
this.hasQualifiedName("net", "IPConn", "ReadFrom") and
(inp.isReceiver() and outp.isParameter(0))
or
// signature: func (*IPConn).ReadFromIP(b []byte) (int, *IPAddr, error)
this.hasQualifiedName("net", "IPConn", "ReadFromIP") and
(inp.isReceiver() and outp.isParameter(0))
or
// signature: func (*IPConn).ReadMsgIP(b []byte, oob []byte) (n int, oobn int, flags int, addr *IPAddr, err error)
this.hasQualifiedName("net", "IPConn", "ReadMsgIP") and
(inp.isReceiver() and outp.isParameter(_))
or
// signature: func (*IPConn).SyscallConn() (syscall.RawConn, error)
this.hasQualifiedName("net", "IPConn", "SyscallConn") and
(
inp.isReceiver() and outp.isResult(0)
or
inp.isResult(0) and outp.isReceiver()
)
or
// signature: func (*IPConn).WriteMsgIP(b []byte, oob []byte, addr *IPAddr) (n int, oobn int, err error)
this.hasQualifiedName("net", "IPConn", "WriteMsgIP") and
(inp.isParameter([0, 1]) and outp.isReceiver())
or
// signature: func (*IPConn).WriteTo(b []byte, addr Addr) (int, error)
this.hasQualifiedName("net", "IPConn", "WriteTo") and
(inp.isParameter(0) and outp.isReceiver())
or
// signature: func (*IPConn).WriteToIP(b []byte, addr *IPAddr) (int, error)
this.hasQualifiedName("net", "IPConn", "WriteToIP") and
(inp.isParameter(0) and outp.isReceiver())
or
// signature: func (*TCPConn).ReadFrom(r io.Reader) (int64, error)
this.hasQualifiedName("net", "TCPConn", "ReadFrom") and
(inp.isParameter(0) and outp.isReceiver())
or
// signature: func (*TCPConn).SyscallConn() (syscall.RawConn, error)
this.hasQualifiedName("net", "TCPConn", "SyscallConn") and
(
inp.isReceiver() and outp.isResult(0)
or
inp.isResult(0) and outp.isReceiver()
)
or
// signature: func (*TCPListener).File() (f *os.File, err error)
this.hasQualifiedName("net", "TCPListener", "File") and
(
inp.isReceiver() and outp.isResult(0)
or
inp.isResult(0) and outp.isReceiver()
)
or
// signature: func (*TCPListener).SyscallConn() (syscall.RawConn, error)
this.hasQualifiedName("net", "TCPListener", "SyscallConn") and
(
inp.isReceiver() and outp.isResult(0)
or
inp.isResult(0) and outp.isReceiver()
)
or
// signature: func (*UDPConn).ReadFrom(b []byte) (int, Addr, error)
this.hasQualifiedName("net", "UDPConn", "ReadFrom") and
(inp.isReceiver() and outp.isParameter(0))
or
// signature: func (*UDPConn).ReadFromUDP(b []byte) (int, *UDPAddr, error)
this.hasQualifiedName("net", "UDPConn", "ReadFromUDP") and
(inp.isReceiver() and outp.isParameter(0))
or
// signature: func (*UDPConn).ReadMsgUDP(b []byte, oob []byte) (n int, oobn int, flags int, addr *UDPAddr, err error)
this.hasQualifiedName("net", "UDPConn", "ReadMsgUDP") and
(inp.isReceiver() and outp.isParameter(_))
or
// signature: func (*UDPConn).SyscallConn() (syscall.RawConn, error)
this.hasQualifiedName("net", "UDPConn", "SyscallConn") and
(
inp.isReceiver() and outp.isResult(0)
or
inp.isResult(0) and outp.isReceiver()
)
or
// signature: func (*UDPConn).WriteMsgUDP(b []byte, oob []byte, addr *UDPAddr) (n int, oobn int, err error)
this.hasQualifiedName("net", "UDPConn", "WriteMsgUDP") and
(inp.isParameter([0, 1]) and outp.isReceiver())
or
// signature: func (*UDPConn).WriteTo(b []byte, addr Addr) (int, error)
this.hasQualifiedName("net", "UDPConn", "WriteTo") and
(inp.isParameter(0) and outp.isReceiver())
or
// signature: func (*UDPConn).WriteToUDP(b []byte, addr *UDPAddr) (int, error)
this.hasQualifiedName("net", "UDPConn", "WriteToUDP") and
(inp.isParameter(0) and outp.isReceiver())
or
// signature: func (*UnixConn).ReadFrom(b []byte) (int, Addr, error)
this.hasQualifiedName("net", "UnixConn", "ReadFrom") and
(inp.isReceiver() and outp.isParameter(0))
or
// signature: func (*UnixConn).ReadFromUnix(b []byte) (int, *UnixAddr, error)
this.hasQualifiedName("net", "UnixConn", "ReadFromUnix") and
(inp.isReceiver() and outp.isParameter(0))
or
// signature: func (*UnixConn).ReadMsgUnix(b []byte, oob []byte) (n int, oobn int, flags int, addr *UnixAddr, err error)
this.hasQualifiedName("net", "UnixConn", "ReadMsgUnix") and
(inp.isReceiver() and outp.isParameter(_))
or
// signature: func (*UnixConn).SyscallConn() (syscall.RawConn, error)
this.hasQualifiedName("net", "UnixConn", "SyscallConn") and
(
inp.isReceiver() and outp.isResult(0)
or
inp.isResult(0) and outp.isReceiver()
)
or
// signature: func (*UnixConn).WriteMsgUnix(b []byte, oob []byte, addr *UnixAddr) (n int, oobn int, err error)
this.hasQualifiedName("net", "UnixConn", "WriteMsgUnix") and
(inp.isParameter([0, 1]) and outp.isReceiver())
or
// signature: func (*UnixConn).WriteTo(b []byte, addr Addr) (int, error)
this.hasQualifiedName("net", "UnixConn", "WriteTo") and
(inp.isParameter(0) and outp.isReceiver())
or
// signature: func (*UnixConn).WriteToUnix(b []byte, addr *UnixAddr) (int, error)
this.hasQualifiedName("net", "UnixConn", "WriteToUnix") and
(inp.isParameter(0) and outp.isReceiver())
or
// signature: func (*UnixListener).File() (f *os.File, err error)
this.hasQualifiedName("net", "UnixListener", "File") and
(
inp.isReceiver() and outp.isResult(0)
or
inp.isResult(0) and outp.isReceiver()
)
or
// signature: func (*UnixListener).SyscallConn() (syscall.RawConn, error)
this.hasQualifiedName("net", "UnixListener", "SyscallConn") and
(
inp.isReceiver() and outp.isResult(0)
or
inp.isResult(0) and outp.isReceiver()
)
or
// signature: func (Conn).Read(b []byte) (n int, err error)
this.implements("net", "Conn", "Read") and
(inp.isReceiver() and outp.isParameter(0))
or
// signature: func (PacketConn).ReadFrom(p []byte) (n int, addr Addr, err error)
this.implements("net", "PacketConn", "ReadFrom") and
(inp.isReceiver() and outp.isParameter(0))
or
// signature: func (Addr).String() string
this.implements("net", "Addr", "String") and
(inp.isReceiver() and outp.isResult())
or
// signature: func (Conn).Write(b []byte) (n int, err error)
this.implements("net", "Conn", "Write") and
(inp.isParameter(0) and outp.isReceiver())
or
// signature: func (PacketConn).WriteTo(p []byte, addr Addr) (n int, err error)
this.implements("net", "PacketConn", "WriteTo") and
(inp.isParameter(0) and outp.isReceiver())
}
override predicate hasTaintFlow(FunctionInput input, FunctionOutput output) {
input = inp and output = outp
}
}
}

View File

@@ -0,0 +1,793 @@
// Code generated by https://github.com/gagliardetto/codebox. DO NOT EDIT.
package main
import (
"io"
"net"
"os"
"syscall"
)
func TaintStepTest_NetFileConn_B0I0O0(sourceCQL interface{}) interface{} {
fromFile656 := sourceCQL.(*os.File)
intoConn414, _ := net.FileConn(fromFile656)
return intoConn414
}
func TaintStepTest_NetFileConn_B1I0O0(sourceCQL interface{}) interface{} {
fromConn518 := sourceCQL.(net.Conn)
var intoFile650 *os.File
intermediateCQL, _ := net.FileConn(intoFile650)
link(fromConn518, intermediateCQL)
return intoFile650
}
func TaintStepTest_NetFilePacketConn_B0I0O0(sourceCQL interface{}) interface{} {
fromFile784 := sourceCQL.(*os.File)
intoPacketConn957, _ := net.FilePacketConn(fromFile784)
return intoPacketConn957
}
func TaintStepTest_NetFilePacketConn_B1I0O0(sourceCQL interface{}) interface{} {
fromPacketConn520 := sourceCQL.(net.PacketConn)
var intoFile443 *os.File
intermediateCQL, _ := net.FilePacketConn(intoFile443)
link(fromPacketConn520, intermediateCQL)
return intoFile443
}
func TaintStepTest_NetJoinHostPort_B0I0O0(sourceCQL interface{}) interface{} {
fromString127 := sourceCQL.(string)
intoString483 := net.JoinHostPort(fromString127, "")
return intoString483
}
func TaintStepTest_NetJoinHostPort_B0I1O0(sourceCQL interface{}) interface{} {
fromString989 := sourceCQL.(string)
intoString982 := net.JoinHostPort("", fromString989)
return intoString982
}
func TaintStepTest_NetParseCIDR_B0I0O0(sourceCQL interface{}) interface{} {
fromString417 := sourceCQL.(string)
intoIP584, _, _ := net.ParseCIDR(fromString417)
return intoIP584
}
func TaintStepTest_NetParseCIDR_B0I0O1(sourceCQL interface{}) interface{} {
fromString991 := sourceCQL.(string)
_, intoIPNet881, _ := net.ParseCIDR(fromString991)
return intoIPNet881
}
func TaintStepTest_NetParseIP_B0I0O0(sourceCQL interface{}) interface{} {
fromString186 := sourceCQL.(string)
intoIP284 := net.ParseIP(fromString186)
return intoIP284
}
func TaintStepTest_NetParseMAC_B0I0O0(sourceCQL interface{}) interface{} {
fromString908 := sourceCQL.(string)
intoHardwareAddr137, _ := net.ParseMAC(fromString908)
return intoHardwareAddr137
}
func TaintStepTest_NetPipe_B0I0O0(sourceCQL interface{}) interface{} {
fromConn494 := sourceCQL.(net.Conn)
intermediateCQL, intoConn873 := net.Pipe()
link(fromConn494, intermediateCQL)
return intoConn873
}
func TaintStepTest_NetPipe_B1I0O0(sourceCQL interface{}) interface{} {
fromConn599 := sourceCQL.(net.Conn)
intoConn409, intermediateCQL := net.Pipe()
link(fromConn599, intermediateCQL)
return intoConn409
}
func TaintStepTest_NetSplitHostPort_B0I0O0(sourceCQL interface{}) interface{} {
fromString246 := sourceCQL.(string)
intoString898, _, _ := net.SplitHostPort(fromString246)
return intoString898
}
func TaintStepTest_NetSplitHostPort_B0I0O1(sourceCQL interface{}) interface{} {
fromString598 := sourceCQL.(string)
_, intoString631, _ := net.SplitHostPort(fromString598)
return intoString631
}
func TaintStepTest_NetBuffersRead_B0I0O0(sourceCQL interface{}) interface{} {
fromBuffers165 := sourceCQL.(net.Buffers)
var intoByte150 []byte
fromBuffers165.Read(intoByte150)
return intoByte150
}
func TaintStepTest_NetBuffersWriteTo_B0I0O0(sourceCQL interface{}) interface{} {
fromBuffers340 := sourceCQL.(net.Buffers)
var intoWriter471 io.Writer
fromBuffers340.WriteTo(intoWriter471)
return intoWriter471
}
func TaintStepTest_NetIPMarshalText_B0I0O0(sourceCQL interface{}) interface{} {
fromIP290 := sourceCQL.(net.IP)
intoByte758, _ := fromIP290.MarshalText()
return intoByte758
}
func TaintStepTest_NetIPTo16_B0I0O0(sourceCQL interface{}) interface{} {
fromIP396 := sourceCQL.(net.IP)
intoIP707 := fromIP396.To16()
return intoIP707
}
func TaintStepTest_NetIPTo4_B0I0O0(sourceCQL interface{}) interface{} {
fromIP912 := sourceCQL.(net.IP)
intoIP718 := fromIP912.To4()
return intoIP718
}
func TaintStepTest_NetIPUnmarshalText_B0I0O0(sourceCQL interface{}) interface{} {
fromByte972 := sourceCQL.([]byte)
var intoIP633 net.IP
intoIP633.UnmarshalText(fromByte972)
return intoIP633
}
func TaintStepTest_NetIPConnReadFrom_B0I0O0(sourceCQL interface{}) interface{} {
fromIPConn316 := sourceCQL.(net.IPConn)
var intoByte145 []byte
fromIPConn316.ReadFrom(intoByte145)
return intoByte145
}
func TaintStepTest_NetIPConnReadFromIP_B0I0O0(sourceCQL interface{}) interface{} {
fromIPConn817 := sourceCQL.(net.IPConn)
var intoByte474 []byte
fromIPConn817.ReadFromIP(intoByte474)
return intoByte474
}
func TaintStepTest_NetIPConnReadMsgIP_B0I0O0(sourceCQL interface{}) interface{} {
fromIPConn832 := sourceCQL.(net.IPConn)
var intoByte378 []byte
fromIPConn832.ReadMsgIP(intoByte378, nil)
return intoByte378
}
func TaintStepTest_NetIPConnReadMsgIP_B0I0O1(sourceCQL interface{}) interface{} {
fromIPConn541 := sourceCQL.(net.IPConn)
var intoByte139 []byte
fromIPConn541.ReadMsgIP(nil, intoByte139)
return intoByte139
}
func TaintStepTest_NetIPConnSyscallConn_B0I0O0(sourceCQL interface{}) interface{} {
fromIPConn814 := sourceCQL.(net.IPConn)
intoRawConn768, _ := fromIPConn814.SyscallConn()
return intoRawConn768
}
func TaintStepTest_NetIPConnSyscallConn_B1I0O0(sourceCQL interface{}) interface{} {
fromRawConn468 := sourceCQL.(syscall.RawConn)
var intoIPConn736 net.IPConn
intermediateCQL, _ := intoIPConn736.SyscallConn()
link(fromRawConn468, intermediateCQL)
return intoIPConn736
}
func TaintStepTest_NetIPConnWriteMsgIP_B0I0O0(sourceCQL interface{}) interface{} {
fromByte516 := sourceCQL.([]byte)
var intoIPConn246 net.IPConn
intoIPConn246.WriteMsgIP(fromByte516, nil, nil)
return intoIPConn246
}
func TaintStepTest_NetIPConnWriteMsgIP_B0I1O0(sourceCQL interface{}) interface{} {
fromByte679 := sourceCQL.([]byte)
var intoIPConn736 net.IPConn
intoIPConn736.WriteMsgIP(nil, fromByte679, nil)
return intoIPConn736
}
func TaintStepTest_NetIPConnWriteTo_B0I0O0(sourceCQL interface{}) interface{} {
fromByte839 := sourceCQL.([]byte)
var intoIPConn273 net.IPConn
intoIPConn273.WriteTo(fromByte839, nil)
return intoIPConn273
}
func TaintStepTest_NetIPConnWriteToIP_B0I0O0(sourceCQL interface{}) interface{} {
fromByte982 := sourceCQL.([]byte)
var intoIPConn458 net.IPConn
intoIPConn458.WriteToIP(fromByte982, nil)
return intoIPConn458
}
func TaintStepTest_NetTCPConnReadFrom_B0I0O0(sourceCQL interface{}) interface{} {
fromReader506 := sourceCQL.(io.Reader)
var intoTCPConn213 net.TCPConn
intoTCPConn213.ReadFrom(fromReader506)
return intoTCPConn213
}
func TaintStepTest_NetTCPConnSyscallConn_B0I0O0(sourceCQL interface{}) interface{} {
fromTCPConn468 := sourceCQL.(net.TCPConn)
intoRawConn219, _ := fromTCPConn468.SyscallConn()
return intoRawConn219
}
func TaintStepTest_NetTCPConnSyscallConn_B1I0O0(sourceCQL interface{}) interface{} {
fromRawConn265 := sourceCQL.(syscall.RawConn)
var intoTCPConn971 net.TCPConn
intermediateCQL, _ := intoTCPConn971.SyscallConn()
link(fromRawConn265, intermediateCQL)
return intoTCPConn971
}
func TaintStepTest_NetTCPListenerFile_B0I0O0(sourceCQL interface{}) interface{} {
fromTCPListener320 := sourceCQL.(net.TCPListener)
intoFile545, _ := fromTCPListener320.File()
return intoFile545
}
func TaintStepTest_NetTCPListenerFile_B1I0O0(sourceCQL interface{}) interface{} {
fromFile566 := sourceCQL.(*os.File)
var intoTCPListener497 net.TCPListener
intermediateCQL, _ := intoTCPListener497.File()
link(fromFile566, intermediateCQL)
return intoTCPListener497
}
func TaintStepTest_NetTCPListenerSyscallConn_B0I0O0(sourceCQL interface{}) interface{} {
fromTCPListener274 := sourceCQL.(net.TCPListener)
intoRawConn783, _ := fromTCPListener274.SyscallConn()
return intoRawConn783
}
func TaintStepTest_NetTCPListenerSyscallConn_B1I0O0(sourceCQL interface{}) interface{} {
fromRawConn905 := sourceCQL.(syscall.RawConn)
var intoTCPListener389 net.TCPListener
intermediateCQL, _ := intoTCPListener389.SyscallConn()
link(fromRawConn905, intermediateCQL)
return intoTCPListener389
}
func TaintStepTest_NetUDPConnReadFrom_B0I0O0(sourceCQL interface{}) interface{} {
fromUDPConn198 := sourceCQL.(net.UDPConn)
var intoByte477 []byte
fromUDPConn198.ReadFrom(intoByte477)
return intoByte477
}
func TaintStepTest_NetUDPConnReadFromUDP_B0I0O0(sourceCQL interface{}) interface{} {
fromUDPConn544 := sourceCQL.(net.UDPConn)
var intoByte382 []byte
fromUDPConn544.ReadFromUDP(intoByte382)
return intoByte382
}
func TaintStepTest_NetUDPConnReadMsgUDP_B0I0O0(sourceCQL interface{}) interface{} {
fromUDPConn715 := sourceCQL.(net.UDPConn)
var intoByte179 []byte
fromUDPConn715.ReadMsgUDP(intoByte179, nil)
return intoByte179
}
func TaintStepTest_NetUDPConnReadMsgUDP_B0I0O1(sourceCQL interface{}) interface{} {
fromUDPConn366 := sourceCQL.(net.UDPConn)
var intoByte648 []byte
fromUDPConn366.ReadMsgUDP(nil, intoByte648)
return intoByte648
}
func TaintStepTest_NetUDPConnSyscallConn_B0I0O0(sourceCQL interface{}) interface{} {
fromUDPConn544 := sourceCQL.(net.UDPConn)
intoRawConn484, _ := fromUDPConn544.SyscallConn()
return intoRawConn484
}
func TaintStepTest_NetUDPConnSyscallConn_B1I0O0(sourceCQL interface{}) interface{} {
fromRawConn824 := sourceCQL.(syscall.RawConn)
var intoUDPConn754 net.UDPConn
intermediateCQL, _ := intoUDPConn754.SyscallConn()
link(fromRawConn824, intermediateCQL)
return intoUDPConn754
}
func TaintStepTest_NetUDPConnWriteMsgUDP_B0I0O0(sourceCQL interface{}) interface{} {
fromByte680 := sourceCQL.([]byte)
var intoUDPConn722 net.UDPConn
intoUDPConn722.WriteMsgUDP(fromByte680, nil, nil)
return intoUDPConn722
}
func TaintStepTest_NetUDPConnWriteMsgUDP_B0I1O0(sourceCQL interface{}) interface{} {
fromByte506 := sourceCQL.([]byte)
var intoUDPConn121 net.UDPConn
intoUDPConn121.WriteMsgUDP(nil, fromByte506, nil)
return intoUDPConn121
}
func TaintStepTest_NetUDPConnWriteTo_B0I0O0(sourceCQL interface{}) interface{} {
fromByte293 := sourceCQL.([]byte)
var intoUDPConn151 net.UDPConn
intoUDPConn151.WriteTo(fromByte293, nil)
return intoUDPConn151
}
func TaintStepTest_NetUDPConnWriteToUDP_B0I0O0(sourceCQL interface{}) interface{} {
fromByte849 := sourceCQL.([]byte)
var intoUDPConn322 net.UDPConn
intoUDPConn322.WriteToUDP(fromByte849, nil)
return intoUDPConn322
}
func TaintStepTest_NetUnixConnReadFrom_B0I0O0(sourceCQL interface{}) interface{} {
fromUnixConn339 := sourceCQL.(net.UnixConn)
var intoByte478 []byte
fromUnixConn339.ReadFrom(intoByte478)
return intoByte478
}
func TaintStepTest_NetUnixConnReadFromUnix_B0I0O0(sourceCQL interface{}) interface{} {
fromUnixConn399 := sourceCQL.(net.UnixConn)
var intoByte426 []byte
fromUnixConn399.ReadFromUnix(intoByte426)
return intoByte426
}
func TaintStepTest_NetUnixConnReadMsgUnix_B0I0O0(sourceCQL interface{}) interface{} {
fromUnixConn628 := sourceCQL.(net.UnixConn)
var intoByte197 []byte
fromUnixConn628.ReadMsgUnix(intoByte197, nil)
return intoByte197
}
func TaintStepTest_NetUnixConnReadMsgUnix_B0I0O1(sourceCQL interface{}) interface{} {
fromUnixConn216 := sourceCQL.(net.UnixConn)
var intoByte742 []byte
fromUnixConn216.ReadMsgUnix(nil, intoByte742)
return intoByte742
}
func TaintStepTest_NetUnixConnSyscallConn_B0I0O0(sourceCQL interface{}) interface{} {
fromUnixConn906 := sourceCQL.(net.UnixConn)
intoRawConn620, _ := fromUnixConn906.SyscallConn()
return intoRawConn620
}
func TaintStepTest_NetUnixConnSyscallConn_B1I0O0(sourceCQL interface{}) interface{} {
fromRawConn158 := sourceCQL.(syscall.RawConn)
var intoUnixConn353 net.UnixConn
intermediateCQL, _ := intoUnixConn353.SyscallConn()
link(fromRawConn158, intermediateCQL)
return intoUnixConn353
}
func TaintStepTest_NetUnixConnWriteMsgUnix_B0I0O0(sourceCQL interface{}) interface{} {
fromByte625 := sourceCQL.([]byte)
var intoUnixConn340 net.UnixConn
intoUnixConn340.WriteMsgUnix(fromByte625, nil, nil)
return intoUnixConn340
}
func TaintStepTest_NetUnixConnWriteMsgUnix_B0I1O0(sourceCQL interface{}) interface{} {
fromByte741 := sourceCQL.([]byte)
var intoUnixConn199 net.UnixConn
intoUnixConn199.WriteMsgUnix(nil, fromByte741, nil)
return intoUnixConn199
}
func TaintStepTest_NetUnixConnWriteTo_B0I0O0(sourceCQL interface{}) interface{} {
fromByte873 := sourceCQL.([]byte)
var intoUnixConn304 net.UnixConn
intoUnixConn304.WriteTo(fromByte873, nil)
return intoUnixConn304
}
func TaintStepTest_NetUnixConnWriteToUnix_B0I0O0(sourceCQL interface{}) interface{} {
fromByte262 := sourceCQL.([]byte)
var intoUnixConn341 net.UnixConn
intoUnixConn341.WriteToUnix(fromByte262, nil)
return intoUnixConn341
}
func TaintStepTest_NetUnixListenerFile_B0I0O0(sourceCQL interface{}) interface{} {
fromUnixListener495 := sourceCQL.(net.UnixListener)
intoFile976, _ := fromUnixListener495.File()
return intoFile976
}
func TaintStepTest_NetUnixListenerFile_B1I0O0(sourceCQL interface{}) interface{} {
fromFile194 := sourceCQL.(*os.File)
var intoUnixListener736 net.UnixListener
intermediateCQL, _ := intoUnixListener736.File()
link(fromFile194, intermediateCQL)
return intoUnixListener736
}
func TaintStepTest_NetUnixListenerSyscallConn_B0I0O0(sourceCQL interface{}) interface{} {
fromUnixListener870 := sourceCQL.(net.UnixListener)
intoRawConn741, _ := fromUnixListener870.SyscallConn()
return intoRawConn741
}
func TaintStepTest_NetUnixListenerSyscallConn_B1I0O0(sourceCQL interface{}) interface{} {
fromRawConn653 := sourceCQL.(syscall.RawConn)
var intoUnixListener937 net.UnixListener
intermediateCQL, _ := intoUnixListener937.SyscallConn()
link(fromRawConn653, intermediateCQL)
return intoUnixListener937
}
func TaintStepTest_NetConnRead_B0I0O0(sourceCQL interface{}) interface{} {
fromConn996 := sourceCQL.(net.Conn)
var intoByte198 []byte
fromConn996.Read(intoByte198)
return intoByte198
}
func TaintStepTest_NetPacketConnReadFrom_B0I0O0(sourceCQL interface{}) interface{} {
fromPacketConn481 := sourceCQL.(net.PacketConn)
var intoByte981 []byte
fromPacketConn481.ReadFrom(intoByte981)
return intoByte981
}
func TaintStepTest_NetAddrString_B0I0O0(sourceCQL interface{}) interface{} {
fromAddr788 := sourceCQL.(net.Addr)
intoString493 := fromAddr788.String()
return intoString493
}
func TaintStepTest_NetConnWrite_B0I0O0(sourceCQL interface{}) interface{} {
fromByte298 := sourceCQL.([]byte)
var intoConn852 net.Conn
intoConn852.Write(fromByte298)
return intoConn852
}
func TaintStepTest_NetPacketConnWriteTo_B0I0O0(sourceCQL interface{}) interface{} {
fromByte771 := sourceCQL.([]byte)
var intoPacketConn246 net.PacketConn
intoPacketConn246.WriteTo(fromByte771, nil)
return intoPacketConn246
}
func RunAllTaints_Net() {
{
source := newSource(0)
out := TaintStepTest_NetFileConn_B0I0O0(source)
sink(0, out)
}
{
source := newSource(1)
out := TaintStepTest_NetFileConn_B1I0O0(source)
sink(1, out)
}
{
source := newSource(2)
out := TaintStepTest_NetFilePacketConn_B0I0O0(source)
sink(2, out)
}
{
source := newSource(3)
out := TaintStepTest_NetFilePacketConn_B1I0O0(source)
sink(3, out)
}
{
source := newSource(4)
out := TaintStepTest_NetJoinHostPort_B0I0O0(source)
sink(4, out)
}
{
source := newSource(5)
out := TaintStepTest_NetJoinHostPort_B0I1O0(source)
sink(5, out)
}
{
source := newSource(6)
out := TaintStepTest_NetParseCIDR_B0I0O0(source)
sink(6, out)
}
{
source := newSource(7)
out := TaintStepTest_NetParseCIDR_B0I0O1(source)
sink(7, out)
}
{
source := newSource(8)
out := TaintStepTest_NetParseIP_B0I0O0(source)
sink(8, out)
}
{
source := newSource(9)
out := TaintStepTest_NetParseMAC_B0I0O0(source)
sink(9, out)
}
{
source := newSource(10)
out := TaintStepTest_NetPipe_B0I0O0(source)
sink(10, out)
}
{
source := newSource(11)
out := TaintStepTest_NetPipe_B1I0O0(source)
sink(11, out)
}
{
source := newSource(12)
out := TaintStepTest_NetSplitHostPort_B0I0O0(source)
sink(12, out)
}
{
source := newSource(13)
out := TaintStepTest_NetSplitHostPort_B0I0O1(source)
sink(13, out)
}
{
source := newSource(14)
out := TaintStepTest_NetBuffersRead_B0I0O0(source)
sink(14, out)
}
{
source := newSource(15)
out := TaintStepTest_NetBuffersWriteTo_B0I0O0(source)
sink(15, out)
}
{
source := newSource(16)
out := TaintStepTest_NetIPMarshalText_B0I0O0(source)
sink(16, out)
}
{
source := newSource(17)
out := TaintStepTest_NetIPTo16_B0I0O0(source)
sink(17, out)
}
{
source := newSource(18)
out := TaintStepTest_NetIPTo4_B0I0O0(source)
sink(18, out)
}
{
source := newSource(19)
out := TaintStepTest_NetIPUnmarshalText_B0I0O0(source)
sink(19, out)
}
{
source := newSource(20)
out := TaintStepTest_NetIPConnReadFrom_B0I0O0(source)
sink(20, out)
}
{
source := newSource(21)
out := TaintStepTest_NetIPConnReadFromIP_B0I0O0(source)
sink(21, out)
}
{
source := newSource(22)
out := TaintStepTest_NetIPConnReadMsgIP_B0I0O0(source)
sink(22, out)
}
{
source := newSource(23)
out := TaintStepTest_NetIPConnReadMsgIP_B0I0O1(source)
sink(23, out)
}
{
source := newSource(24)
out := TaintStepTest_NetIPConnSyscallConn_B0I0O0(source)
sink(24, out)
}
{
source := newSource(25)
out := TaintStepTest_NetIPConnSyscallConn_B1I0O0(source)
sink(25, out)
}
{
source := newSource(26)
out := TaintStepTest_NetIPConnWriteMsgIP_B0I0O0(source)
sink(26, out)
}
{
source := newSource(27)
out := TaintStepTest_NetIPConnWriteMsgIP_B0I1O0(source)
sink(27, out)
}
{
source := newSource(28)
out := TaintStepTest_NetIPConnWriteTo_B0I0O0(source)
sink(28, out)
}
{
source := newSource(29)
out := TaintStepTest_NetIPConnWriteToIP_B0I0O0(source)
sink(29, out)
}
{
source := newSource(30)
out := TaintStepTest_NetTCPConnReadFrom_B0I0O0(source)
sink(30, out)
}
{
source := newSource(31)
out := TaintStepTest_NetTCPConnSyscallConn_B0I0O0(source)
sink(31, out)
}
{
source := newSource(32)
out := TaintStepTest_NetTCPConnSyscallConn_B1I0O0(source)
sink(32, out)
}
{
source := newSource(33)
out := TaintStepTest_NetTCPListenerFile_B0I0O0(source)
sink(33, out)
}
{
source := newSource(34)
out := TaintStepTest_NetTCPListenerFile_B1I0O0(source)
sink(34, out)
}
{
source := newSource(35)
out := TaintStepTest_NetTCPListenerSyscallConn_B0I0O0(source)
sink(35, out)
}
{
source := newSource(36)
out := TaintStepTest_NetTCPListenerSyscallConn_B1I0O0(source)
sink(36, out)
}
{
source := newSource(37)
out := TaintStepTest_NetUDPConnReadFrom_B0I0O0(source)
sink(37, out)
}
{
source := newSource(38)
out := TaintStepTest_NetUDPConnReadFromUDP_B0I0O0(source)
sink(38, out)
}
{
source := newSource(39)
out := TaintStepTest_NetUDPConnReadMsgUDP_B0I0O0(source)
sink(39, out)
}
{
source := newSource(40)
out := TaintStepTest_NetUDPConnReadMsgUDP_B0I0O1(source)
sink(40, out)
}
{
source := newSource(41)
out := TaintStepTest_NetUDPConnSyscallConn_B0I0O0(source)
sink(41, out)
}
{
source := newSource(42)
out := TaintStepTest_NetUDPConnSyscallConn_B1I0O0(source)
sink(42, out)
}
{
source := newSource(43)
out := TaintStepTest_NetUDPConnWriteMsgUDP_B0I0O0(source)
sink(43, out)
}
{
source := newSource(44)
out := TaintStepTest_NetUDPConnWriteMsgUDP_B0I1O0(source)
sink(44, out)
}
{
source := newSource(45)
out := TaintStepTest_NetUDPConnWriteTo_B0I0O0(source)
sink(45, out)
}
{
source := newSource(46)
out := TaintStepTest_NetUDPConnWriteToUDP_B0I0O0(source)
sink(46, out)
}
{
source := newSource(47)
out := TaintStepTest_NetUnixConnReadFrom_B0I0O0(source)
sink(47, out)
}
{
source := newSource(48)
out := TaintStepTest_NetUnixConnReadFromUnix_B0I0O0(source)
sink(48, out)
}
{
source := newSource(49)
out := TaintStepTest_NetUnixConnReadMsgUnix_B0I0O0(source)
sink(49, out)
}
{
source := newSource(50)
out := TaintStepTest_NetUnixConnReadMsgUnix_B0I0O1(source)
sink(50, out)
}
{
source := newSource(51)
out := TaintStepTest_NetUnixConnSyscallConn_B0I0O0(source)
sink(51, out)
}
{
source := newSource(52)
out := TaintStepTest_NetUnixConnSyscallConn_B1I0O0(source)
sink(52, out)
}
{
source := newSource(53)
out := TaintStepTest_NetUnixConnWriteMsgUnix_B0I0O0(source)
sink(53, out)
}
{
source := newSource(54)
out := TaintStepTest_NetUnixConnWriteMsgUnix_B0I1O0(source)
sink(54, out)
}
{
source := newSource(55)
out := TaintStepTest_NetUnixConnWriteTo_B0I0O0(source)
sink(55, out)
}
{
source := newSource(56)
out := TaintStepTest_NetUnixConnWriteToUnix_B0I0O0(source)
sink(56, out)
}
{
source := newSource(57)
out := TaintStepTest_NetUnixListenerFile_B0I0O0(source)
sink(57, out)
}
{
source := newSource(58)
out := TaintStepTest_NetUnixListenerFile_B1I0O0(source)
sink(58, out)
}
{
source := newSource(59)
out := TaintStepTest_NetUnixListenerSyscallConn_B0I0O0(source)
sink(59, out)
}
{
source := newSource(60)
out := TaintStepTest_NetUnixListenerSyscallConn_B1I0O0(source)
sink(60, out)
}
{
source := newSource(61)
out := TaintStepTest_NetConnRead_B0I0O0(source)
sink(61, out)
}
{
source := newSource(62)
out := TaintStepTest_NetPacketConnReadFrom_B0I0O0(source)
sink(62, out)
}
{
source := newSource(63)
out := TaintStepTest_NetAddrString_B0I0O0(source)
sink(63, out)
}
{
source := newSource(64)
out := TaintStepTest_NetConnWrite_B0I0O0(source)
sink(64, out)
}
{
source := newSource(65)
out := TaintStepTest_NetPacketConnWriteTo_B0I0O0(source)
sink(65, out)
}
}