@@ -287,6 +287,9 @@ private predicate isBarrierGuardInternal(Configuration cfg, BarrierGuardNodeInte
287287 guard .( AdditionalBarrierGuardNode ) .appliesTo ( cfg )
288288 or
289289 guard .( DerivedBarrierGuardNode ) .appliesTo ( cfg )
290+ or
291+ cfg instanceof TaintTracking:: Configuration and
292+ guard .( TaintTracking:: AdditionalSanitizerGuardNode ) .appliesTo ( cfg )
290293}
291294
292295/**
@@ -390,6 +393,12 @@ abstract private class DerivedBarrierGuardNode extends BarrierGuardNodeInternal
390393 abstract predicate blocks ( boolean outcome , Expr e , string label ) ;
391394}
392395
396+ /**
397+ * Barrier guards derived from `AdditionalSanitizerGuard`
398+ */
399+ private class BarrierGuardNodeFromAdditionalSanitizerGuard extends BarrierGuardNodeInternal instanceof TaintTracking:: AdditionalSanitizerGuardNode
400+ { }
401+
393402/**
394403 * Holds if data flow node `guard` acts as a barrier for data flow.
395404 *
@@ -404,6 +413,10 @@ private predicate barrierGuardBlocksExpr(
404413 guard .( BarrierGuardNode ) .blocks ( outcome , test , label )
405414 or
406415 guard .( DerivedBarrierGuardNode ) .blocks ( outcome , test , label )
416+ or
417+ guard .( TaintTracking:: AdditionalSanitizerGuardNode ) .sanitizes ( outcome , test ) and label = "taint"
418+ or
419+ guard .( TaintTracking:: AdditionalSanitizerGuardNode ) .sanitizes ( outcome , test , label )
407420}
408421
409422/**
@@ -534,7 +547,7 @@ private predicate isBarrierEdgeRaw(Configuration cfg, DataFlow::Node pred, DataF
534547 cfg .isBarrierEdge ( pred , succ )
535548 or
536549 exists ( BarrierGuardNodeInternal guard |
537- cfg . isBarrierGuard ( guard ) and
550+ isBarrierGuardInternal ( cfg , guard ) and
538551 barrierGuardBlocksEdge ( guard , pred , succ , "" )
539552 )
540553}
@@ -564,7 +577,7 @@ private predicate isLabeledBarrierEdgeRaw(
564577 cfg .isBarrierEdge ( pred , succ , label )
565578 or
566579 exists ( BarrierGuardNodeInternal guard |
567- cfg . isBarrierGuard ( guard ) and
580+ isBarrierGuardInternal ( cfg , guard ) and
568581 barrierGuardBlocksEdge ( guard , pred , succ , label )
569582 )
570583}
0 commit comments