Commit e7dcbd2
committed
net/sched: sch_qfq: Fix race condition on qfq_aggregate
jira VULN-89291
cve CVE-2025-38477
commit-author Xiang Mei <xmei5@asu.edu>
commit 5e28d5a
A race condition can occur when 'agg' is modified in qfq_change_agg
(called during qfq_enqueue) while other threads access it
concurrently. For example, qfq_dump_class may trigger a NULL
dereference, and qfq_delete_class may cause a use-after-free.
This patch addresses the issue by:
1. Moved qfq_destroy_class into the critical section.
2. Added sch_tree_lock protection to qfq_dump_class and
qfq_dump_class_stats.
Fixes: 462dbc9 ("pkt_sched: QFQ Plus: fair-queueing service at DRR cost")
Signed-off-by: Xiang Mei <xmei5@asu.edu>
Reviewed-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 5e28d5a)
Signed-off-by: Jonathan Maple <jmaple@ciq.com>1 parent 9a6cd38 commit e7dcbd2
1 file changed
+21
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
406 | 406 | | |
407 | 407 | | |
408 | 408 | | |
409 | | - | |
| 409 | + | |
410 | 410 | | |
411 | 411 | | |
412 | 412 | | |
| |||
442 | 442 | | |
443 | 443 | | |
444 | 444 | | |
445 | | - | |
446 | | - | |
447 | | - | |
448 | | - | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
449 | 453 | | |
450 | | - | |
| 454 | + | |
451 | 455 | | |
452 | 456 | | |
453 | 457 | | |
| |||
550 | 554 | | |
551 | 555 | | |
552 | 556 | | |
| 557 | + | |
553 | 558 | | |
554 | 559 | | |
555 | 560 | | |
556 | | - | |
557 | 561 | | |
558 | 562 | | |
559 | 563 | | |
| |||
620 | 624 | | |
621 | 625 | | |
622 | 626 | | |
| 627 | + | |
623 | 628 | | |
624 | 629 | | |
625 | 630 | | |
| |||
628 | 633 | | |
629 | 634 | | |
630 | 635 | | |
631 | | - | |
632 | | - | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
633 | 643 | | |
634 | 644 | | |
635 | 645 | | |
| |||
646 | 656 | | |
647 | 657 | | |
648 | 658 | | |
| 659 | + | |
649 | 660 | | |
650 | 661 | | |
| 662 | + | |
651 | 663 | | |
652 | 664 | | |
653 | 665 | | |
| |||
0 commit comments