Commit cb7fe85
committed
net/sched: sch_qfq: Fix race condition on qfq_aggregate
jira VULN-89287
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: Brett Mastbergen <bmastbergen@ciq.com>1 parent 80bf90d commit cb7fe85
1 file changed
+21
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
414 | 414 | | |
415 | 415 | | |
416 | 416 | | |
417 | | - | |
| 417 | + | |
418 | 418 | | |
419 | 419 | | |
420 | 420 | | |
| |||
449 | 449 | | |
450 | 450 | | |
451 | 451 | | |
452 | | - | |
453 | | - | |
454 | | - | |
455 | | - | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
456 | 460 | | |
457 | | - | |
| 461 | + | |
458 | 462 | | |
459 | 463 | | |
460 | 464 | | |
| |||
557 | 561 | | |
558 | 562 | | |
559 | 563 | | |
| 564 | + | |
560 | 565 | | |
561 | 566 | | |
562 | 567 | | |
563 | | - | |
564 | 568 | | |
565 | 569 | | |
566 | 570 | | |
| |||
625 | 629 | | |
626 | 630 | | |
627 | 631 | | |
| 632 | + | |
628 | 633 | | |
629 | 634 | | |
630 | 635 | | |
| |||
633 | 638 | | |
634 | 639 | | |
635 | 640 | | |
636 | | - | |
637 | | - | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
638 | 648 | | |
639 | 649 | | |
640 | 650 | | |
| |||
651 | 661 | | |
652 | 662 | | |
653 | 663 | | |
| 664 | + | |
654 | 665 | | |
655 | 666 | | |
| 667 | + | |
656 | 668 | | |
657 | 669 | | |
658 | 670 | | |
| |||
0 commit comments