2831. [security] Do not attempt to validate or cache
out-of-bailiwick data returned with a secure answer; it must be re-fetched from its original source and validated in that context. [RT #20819]
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
# PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
# $Id: tests.sh,v 1.4 2009/12/30 08:02:22 jinmei Exp $
|
||||
# $Id: tests.sh,v 1.5 2010/01/07 16:48:23 each Exp $
|
||||
|
||||
SYSTEMTESTTOP=..
|
||||
. $SYSTEMTESTTOP/conf.sh
|
||||
@@ -158,5 +158,26 @@ test "$ans" = "$expect" || ret=1
|
||||
test $ret = 0 || echo I:failed, got "'""$ans""'", expected "'""$expect""'"
|
||||
status=`expr $status + $ret`
|
||||
|
||||
#
|
||||
# Try to fool the resolver with an out-of-bailiwick CNAME
|
||||
#
|
||||
echo I:Trying to Prime out-of-bailiwick pending answer with CD
|
||||
ret=0
|
||||
expect="10.10.10.10"
|
||||
ans=`$DIG $DIGOPTS_CD @10.53.0.4 bad.example. A` || ret=1
|
||||
ans=`echo $ans | awk '{print $NF}'`
|
||||
test "$ans" = "$expect" || ret=1
|
||||
test $ret = 0 || echo I:failed, got "'""$ans""'", expected "'""$expect""'"
|
||||
status=`expr $status + $ret`
|
||||
|
||||
echo I:Confirming the out-of-bailiwick answer is not cached or reused with CD
|
||||
ret=0
|
||||
expect="10.10.10.10"
|
||||
ans=`$DIG $DIGOPTS_CD @10.53.0.4 nice.good. A` || ret=1
|
||||
ans=`echo $ans | awk '{print $NF}'`
|
||||
test "$ans" = "$expect" || ret=1
|
||||
test $ret = 0 || echo I:failed, got "'""$ans""'", expected "'""$expect""'"
|
||||
status=`expr $status + $ret`
|
||||
|
||||
echo "I:exit status: $status"
|
||||
exit $status
|
||||
|
||||
Reference in New Issue
Block a user