Skip to content

team: fix header_ops type confusion and add selftest

Jiayuan Chen linux-kselftest lkml netdev 3 versions – Applied

Status from this message: This series was applied to netdev/net.git (main)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest2 patches 0 repliesApplied 2/2
  2. v22 patches 1 replySuperseded
  3. v11 patch 8 repliesSuperseded

Changes in v3 from the cover letter

- Clarify syzbot crash path in commit message
- Fix shellcheck warnings in selftest
- Fix config entry sorting order
- Update comment per AI review feedback

Patches in v3 All 2 applied

#Subject and filesSizeRepliesApplied
1/2team: fix header_ops type confusion with non-Ethernet portsdrivers/net/team/team_core.c+64 -10 repliesApplied
2/2selftests: team: add non-Ethernet header_ops reproducertools/testing/selftests/drivers/net/team/Makefile tools/testing/selftests/drivers/net/team/config tools/testing/selftests/drivers/net/team/non_ether_header_ops.sh+44 -00 repliesApplied

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH net v3 0/2] team: fix header_ops type confusion and add selftest

Hi,

This patch series fixes a panic reported by syzkaller in the team/bond/gre stacked non-Ethernet configuration:
https://syzkaller.appspot.com/bug?extid=3d8bc31c45e11450f24c

The first patch fixes the header_ops type confusion / parse recursion context issue in team. The second patch adds a selftest to reproduce the reported scenario and prevent regressions in the future.

Thanks.

---
Changes in v3:
- Clarify syzbot crash path in commit message
- Fix shellcheck warnings in selftest
- Fix config entry sorting order
- Update comment per AI review feedback

Changes in v2:
- The same fix approach was applied to bonding first, but could cause infinite recursion in bond_header_parse(). Eric spotted the issue and fixed it in:
b7405dcf7385 ("bonding: prevent potential infinite loop in bond_header_parse()") After that fix landed, we continue with the same approach to fix team.

v1: https://lore.kernel.org/netdev/[email protected]/
v2: https://lore.kernel.org/netdev/[email protected]/

Jiayuan Chen (2):
team: fix header_ops type confusion with non-Ethernet ports
selftests: team: add non-Ethernet header_ops reproducer

 drivers/net/team/team_core.c                  | 65 ++++++++++++++++++-
 .../selftests/drivers/net/team/Makefile       |  1 +
 .../testing/selftests/drivers/net/team/config |  2 +
 .../drivers/net/team/non_ether_header_ops.sh  | 41 ++++++++++++
 4 files changed, 108 insertions(+), 1 deletion(-)
 create mode 100755 tools/testing/selftests/drivers/net/team/non_ether_header_ops.sh
Signature · 1 line
2.43.0