Skip to content

Commit d556838

Browse files
vbnogueirakuba-moo
authored andcommitted
selftests/tc-testing: Create test case for UAF scenario with DRR/NETEM/BLACKHOLE chain
Create a tdc test for the UAF scenario with DRR/NETEM/BLACKHOLE chain shared by Lion on his report [1]. [1] https://lore.kernel.org/netdev/[email protected]/ Signed-off-by: Victor Nogueira <[email protected]> Acked-by: Cong Wang <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 22fc46c commit d556838

File tree

1 file changed

+37
-0
lines changed
  • tools/testing/selftests/tc-testing/tc-tests/infra

1 file changed

+37
-0
lines changed

tools/testing/selftests/tc-testing/tc-tests/infra/qdiscs.json

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -635,5 +635,42 @@
635635
"$TC qdisc del dev $DUMMY handle 1:0 root",
636636
"$IP addr del 10.10.10.10/24 dev $DUMMY || true"
637637
]
638+
},
639+
{
640+
"id": "d74b",
641+
"name": "Test use-after-free with DRR/NETEM/BLACKHOLE chain",
642+
"category": [
643+
"qdisc",
644+
"hfsc",
645+
"drr",
646+
"netem",
647+
"blackhole"
648+
],
649+
"plugins": {
650+
"requires": [
651+
"nsPlugin",
652+
"scapyPlugin"
653+
]
654+
},
655+
"setup": [
656+
"$IP link set dev $DUMMY up || true",
657+
"$IP addr add 10.10.11.10/24 dev $DUMMY || true",
658+
"$TC qdisc add dev $DUMMY root handle 1: drr",
659+
"$TC filter add dev $DUMMY parent 1: basic classid 1:1",
660+
"$TC class add dev $DUMMY parent 1: classid 1:1 drr",
661+
"$TC qdisc add dev $DUMMY parent 1:1 handle 2: hfsc def 1",
662+
"$TC class add dev $DUMMY parent 2: classid 2:1 hfsc rt m1 8 d 1 m2 0",
663+
"$TC qdisc add dev $DUMMY parent 2:1 handle 3: netem",
664+
"$TC qdisc add dev $DUMMY parent 3:1 handle 4: blackhole",
665+
"ping -c1 -W0.01 -I $DUMMY 10.10.11.11 || true",
666+
"$TC class del dev $DUMMY classid 1:1"
667+
],
668+
"cmdUnderTest": "ping -c1 -W0.01 -I $DUMMY 10.10.11.11",
669+
"expExitCode": "1",
670+
"verifyCmd": "$TC -j class ls dev $DUMMY classid 1:1",
671+
"matchJSON": [],
672+
"teardown": [
673+
"$TC qdisc del dev $DUMMY root handle 1: drr"
674+
]
638675
}
639676
]

0 commit comments

Comments
 (0)