From: Simon Horman <horms@kernel.org>
To: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Cc: intel-wired-lan@lists.osuosl.org, anthony.l.nguyen@intel.com,
netdev@vger.kernel.org
Subject: Re: [PATCH iwl-net v2 6/6] ixgbe: fix integer overflow and wrong bit position in ixgbe_validate_rtr()
Date: Mon, 13 Apr 2026 14:43:34 +0100 [thread overview]
Message-ID: <20260413134334.GP469338@kernel.org> (raw)
In-Reply-To: <20260408131154.2661818-7-aleksandr.loktionov@intel.com>
On Wed, Apr 08, 2026 at 03:11:54PM +0200, Aleksandr Loktionov wrote:
> Two bugs in the same loop in ixgbe_validate_rtr():
>
> 1. The 3-bit traffic-class field was extracted by shifting a u32 and
> assigning the result directly to a u8. For user priority 0 this is
> harmless; for UP[5..7] the shift leaves bits [15..21] in the u32
> which are then silently truncated when stored in u8. Mask with
> IXGBE_RTRUP2TC_UP_MASK before the assignment so only the intended
> 3 bits are kept.
>
> 2. When clearing an out-of-bounds entry the mask was always shifted by
> the fixed constant IXGBE_RTRUP2TC_UP_SHIFT (== 3), regardless of
> which loop iteration was being processed. This means only UP1 (bit
> position 3) was ever cleared; UP0,2..7 (positions 0, 6, 9, ..., 21)
> were left unreset, so invalid TC mappings persisted in hardware and
> could mis-steer received packets to the wrong traffic class.
> Use i * IXGBE_RTRUP2TC_UP_SHIFT to target the correct 3-bit field
> for each iteration.
>
> Swap the operand order in the mask expression to place the constant
> on the right per kernel coding style (noted by David Laight).
>
> Fixes: e7589eab9291 ("ixgbe: consolidate, setup for multiple traffic classes")
> Cc: stable@vger.kernel.org
> Signed-off-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
> ---
> v1 -> v2:
> - Add Fixes: tag; reroute to iwl-net (wrong bit positions cause packet
> mis-steering); swap to (reg >> ...) & MASK operand order per David
> Laight.
Reviewed-by: Simon Horman <horms@kernel.org>
next prev parent reply other threads:[~2026-04-13 13:43 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-08 13:11 [PATCH iwl-net v2 0/6] ixgbe: six bug fixes Aleksandr Loktionov
2026-04-08 13:11 ` [PATCH iwl-net v2 1/6] ixgbe: fix SWFW semaphore timeout for X550 family Aleksandr Loktionov
2026-04-13 10:52 ` Simon Horman
2026-04-14 0:56 ` [Intel-wired-lan] " Jacob Keller
2026-04-08 13:11 ` [PATCH iwl-net v2 2/6] ixgbe: add bounds check for debugfs register access Aleksandr Loktionov
2026-04-13 10:30 ` Simon Horman
2026-04-14 1:00 ` [Intel-wired-lan] " Jacob Keller
2026-04-14 17:16 ` Simon Horman
2026-04-08 13:11 ` [PATCH iwl-net v2 3/6] ixgbe: call ixgbe_setup_fc() before fc_enable() after NVM update Aleksandr Loktionov
2026-04-13 10:51 ` Simon Horman
2026-04-08 13:11 ` [PATCH iwl-net v2 4/6] ixgbe: fix cls_u32 nexthdr path returning success when no entry installed Aleksandr Loktionov
2026-04-13 10:54 ` Simon Horman
2026-04-08 13:11 ` [PATCH iwl-net v2 5/6] ixgbe: fix ITR value overflow in adaptive interrupt throttling Aleksandr Loktionov
2026-04-13 13:39 ` Simon Horman
2026-04-08 13:11 ` [PATCH iwl-net v2 6/6] ixgbe: fix integer overflow and wrong bit position in ixgbe_validate_rtr() Aleksandr Loktionov
2026-04-13 13:43 ` Simon Horman [this message]
2026-04-13 14:02 ` Simon Horman
2026-04-13 14:03 ` Simon Horman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260413134334.GP469338@kernel.org \
--to=horms@kernel.org \
--cc=aleksandr.loktionov@intel.com \
--cc=anthony.l.nguyen@intel.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox