mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Correctly handle aliases for the target on inetd rules. Otherwise bad parameters are passed to netcat(nc) and we DoS the host.
This commit is contained in:
parent
d93ee937f2
commit
650b573bd8
@ -1070,7 +1070,12 @@ function filter_generate_reflection($rule, $nordr, $rdr_ifs, $srcaddr, $dstaddr_
|
||||
$socktype = "stream";
|
||||
$dash_u = "";
|
||||
}
|
||||
$reflection_txt[] = "{$inetdport}\t{$socktype}\t{$reflect_proto}\tnowait/0\tnobody\t/usr/bin/nc\tnc {$dash_u}-w {$reflectiontimeout} {$target} {$tda}\n";
|
||||
$target = explode(" ", $target);
|
||||
foreach ($target as $targip) {
|
||||
if (empty($targip))
|
||||
continue;
|
||||
$reflection_txt[] = "{$inetdport}\t{$socktype}\t{$reflect_proto}\tnowait/0\tnobody\t/usr/bin/nc\tnc {$dash_u}-w {$reflectiontimeout} {$targip} {$tda}\n";
|
||||
}
|
||||
}
|
||||
$inetdport++;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user