Commit a9acf18
committed
mctpd: prevent endless VDM query & allocation
Commit cb182be ("mctpd: Add VendorDefinedMessageTypes property") did not
check the returned response selector against anything other than 0xff,
so a remote endpoint could cause a repeated allocation of vdm types.
Keep track of the selector we requested, and ensure that the response is
as expected (ie, either +1 or 0xff). Add a test for a repeated selector
behaviour.
Fixes: cb182be ("mctpd: Add VendorDefinedMessageTypes property")
Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>1 parent cb182be commit a9acf18
2 files changed
Lines changed: 36 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2598 | 2598 | | |
2599 | 2599 | | |
2600 | 2600 | | |
| 2601 | + | |
2601 | 2602 | | |
2602 | 2603 | | |
2603 | 2604 | | |
2604 | | - | |
2605 | 2605 | | |
2606 | 2606 | | |
2607 | 2607 | | |
2608 | | - | |
2609 | 2608 | | |
2610 | | - | |
| 2609 | + | |
2611 | 2610 | | |
| 2611 | + | |
2612 | 2612 | | |
2613 | 2613 | | |
2614 | 2614 | | |
| |||
2681 | 2681 | | |
2682 | 2682 | | |
2683 | 2683 | | |
| 2684 | + | |
| 2685 | + | |
| 2686 | + | |
| 2687 | + | |
| 2688 | + | |
| 2689 | + | |
| 2690 | + | |
| 2691 | + | |
| 2692 | + | |
2684 | 2693 | | |
2685 | | - | |
2686 | | - | |
2687 | | - | |
2688 | 2694 | | |
2689 | 2695 | | |
2690 | 2696 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
749 | 749 | | |
750 | 750 | | |
751 | 751 | | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
752 | 776 | | |
753 | 777 | | |
754 | 778 | | |
| |||
0 commit comments