diff --git a/python/ql/src/Security/CVE-2018-1281/BindToAllInterfaces.ql b/python/ql/src/Security/CVE-2018-1281/BindToAllInterfaces.ql index 75c145ec0ac..14c17edc359 100644 --- a/python/ql/src/Security/CVE-2018-1281/BindToAllInterfaces.ql +++ b/python/ql/src/Security/CVE-2018-1281/BindToAllInterfaces.ql @@ -34,7 +34,11 @@ private module BindToAllInterfacesConfig implements DataFlow::ConfigSig { } predicate isSink(DataFlow::Node sink) { - ModelOutput::sinkNode(sink, "bind-socket-all-interfaces") + ModelOutput::sinkNode(sink, "bind-socket-all-interfaces") and + // Network socket addresses are tuples like (host, port), so we require + // the bind() argument to originate from a tuple expression. This excludes + // AF_UNIX sockets, which pass a plain string path to bind(). + any(DataFlow::LocalSourceNode n | n.asExpr() instanceof Tuple).flowsTo(sink) } } @@ -42,20 +46,8 @@ private module BindToAllInterfacesFlow = TaintTracking::Global