Skip to content

bonding: fix NULL deref in bond_rr_gen_slave_id

Jonathan Toppins linux-kselftest lkml netdev 2 versions – Applied

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

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 1 replyApplied 2/2
  2. v12 patches 4 repliesSuperseded

Patches in v2 All 2 applied

#Subject and filesSizeRepliesApplied
1/2selftests: bonding: cause oops in bond_rr_gen_slave_idtools/testing/selftests/drivers/net/bonding/Makefile tools/testing/selftests/drivers/net/bonding/bond-arp-interval-causes-panic.sh+51 -10 repliesApplied
2/2bonding: fix NULL deref in bond_rr_gen_slave_iddrivers/net/bonding/bond_main.c+6 -90 repliesApplied

Reviews trailers per patch

None of the 2 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchJay Vosburgh
SeriesA-b
1/2
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH net v2 0/2] bonding: fix NULL deref in bond_rr_gen_slave_id

Fix a NULL dereference of the struct bonding.rr_tx_counter member because if a bond is initially created with an initial mode != zero (Round Robin) the memory required for the counter is never created and when the mode is changed there is never any attempt to verify the memory is allocated upon switching modes.

The first patch provides a selftest to demonstrate the issue and the second patch fixes the issue.

Jonathan Toppins (2):
selftests: bonding: cause oops in bond_rr_gen_slave_id
bonding: fix NULL deref in bond_rr_gen_slave_id

 drivers/net/bonding/bond_main.c               | 15 +++---
 .../selftests/drivers/net/bonding/Makefile    |  3 +-
 .../bonding/bond-arp-interval-causes-panic.sh | 49 +++++++++++++++++++
 3 files changed, 57 insertions(+), 10 deletions(-)
 create mode 100755 tools/testing/selftests/drivers/net/bonding/bond-arp-interval-causes-panic.sh
Signature · 1 line
2.31.1