4582. [security] 'rndc ""' could trigger a assertion failure in named.

(CVE-2017-3138) [RT #44924]

(cherry picked from commit 8e8dfc5941)
This commit is contained in:
Mark Andrews
2017-03-25 02:00:17 +11:00
parent 3be4330b77
commit 8c31a25f3f
4 changed files with 14 additions and 4 deletions

View File

@@ -557,5 +557,13 @@ EOF
status=`expr $status + $ret`
fi
n=`expr $n + 1`
echo "I:check 'rndc \"\"' is handled ($n)"
ret=0
$RNDCCMD "" > rndc.out.test$n 2>&1 && ret=1
grep "rndc: '' failed: failure" rndc.out.test$n > /dev/null
if [ $ret != 0 ]; then echo "I:failed"; fi
status=`expr $status + $ret`
echo "I:exit status: $status"
[ $status -eq 0 ] || exit 1