Commit 4b43202
committed
i40e: add validation for ring_len param
jira KERNEL-238
cve CVE-2025-39973
Rebuild_History Non-Buildable kernel-6.12.0-124.16.1.el10_1
commit-author Lukasz Czapnik <lukasz.czapnik@intel.com>
commit 55d2256
The `ring_len` parameter provided by the virtual function (VF)
is assigned directly to the hardware memory context (HMC) without
any validation.
To address this, introduce an upper boundary check for both Tx and Rx
queue lengths. The maximum number of descriptors supported by the
hardware is 8k-32.
Additionally, enforce alignment constraints: Tx rings must be a multiple
of 8, and Rx rings must be a multiple of 32.
Fixes: 5c3c48a ("i40e: implement virtual device interface")
Cc: stable@vger.kernel.org
Signed-off-by: Lukasz Czapnik <lukasz.czapnik@intel.com>
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Signed-off-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Tested-by: Rafal Romanowski <rafal.romanowski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
(cherry picked from commit 55d2256)
Signed-off-by: Jonathan Maple <jmaple@ciq.com>1 parent 3f58a29 commit 4b43202
1 file changed
+14
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
653 | 653 | | |
654 | 654 | | |
655 | 655 | | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
656 | 663 | | |
657 | 664 | | |
658 | 665 | | |
| |||
716 | 723 | | |
717 | 724 | | |
718 | 725 | | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
719 | 733 | | |
720 | 734 | | |
721 | 735 | | |
| |||
0 commit comments