@@ -287,6 +287,9 @@ private predicate isBarrierGuardInternal(Configuration cfg, BarrierGuardNodeInte
287
287
guard .( AdditionalBarrierGuardNode ) .appliesTo ( cfg )
288
288
or
289
289
guard .( DerivedBarrierGuardNode ) .appliesTo ( cfg )
290
+ or
291
+ cfg instanceof TaintTracking:: Configuration and
292
+ guard .( TaintTracking:: AdditionalSanitizerGuardNode ) .appliesTo ( cfg )
290
293
}
291
294
292
295
/**
@@ -390,6 +393,12 @@ abstract private class DerivedBarrierGuardNode extends BarrierGuardNodeInternal
390
393
abstract predicate blocks ( boolean outcome , Expr e , string label ) ;
391
394
}
392
395
396
+ /**
397
+ * Barrier guards derived from `AdditionalSanitizerGuard`
398
+ */
399
+ private class BarrierGuardNodeFromAdditionalSanitizerGuard extends BarrierGuardNodeInternal instanceof TaintTracking:: AdditionalSanitizerGuardNode
400
+ { }
401
+
393
402
/**
394
403
* Holds if data flow node `guard` acts as a barrier for data flow.
395
404
*
@@ -404,6 +413,10 @@ private predicate barrierGuardBlocksExpr(
404
413
guard .( BarrierGuardNode ) .blocks ( outcome , test , label )
405
414
or
406
415
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 )
407
420
}
408
421
409
422
/**
@@ -534,7 +547,7 @@ private predicate isBarrierEdgeRaw(Configuration cfg, DataFlow::Node pred, DataF
534
547
cfg .isBarrierEdge ( pred , succ )
535
548
or
536
549
exists ( BarrierGuardNodeInternal guard |
537
- cfg . isBarrierGuard ( guard ) and
550
+ isBarrierGuardInternal ( cfg , guard ) and
538
551
barrierGuardBlocksEdge ( guard , pred , succ , "" )
539
552
)
540
553
}
@@ -564,7 +577,7 @@ private predicate isLabeledBarrierEdgeRaw(
564
577
cfg .isBarrierEdge ( pred , succ , label )
565
578
or
566
579
exists ( BarrierGuardNodeInternal guard |
567
- cfg . isBarrierGuard ( guard ) and
580
+ isBarrierGuardInternal ( cfg , guard ) and
568
581
barrierGuardBlocksEdge ( guard , pred , succ , label )
569
582
)
570
583
}
0 commit comments