@samitouri / QOSamiQemu / commits / 1e5efe6d93

hw/net/igb: recalculate rx_desc_len on migration load

rx_desc_len is migrated as a raw uint8_t from the stream but is a derived value. Currently igb_rx_use_legacy_descriptor() is a stub that always returns false, so rx_desc_len is always set to sizeof(union e1000_adv_rx_desc). Recalculate it in post_load to prevent a crafted migration stream from setting an invalid value. Cc: qemu-stable@nongnu.org Signed-off-by: Laurent Vivier <lvivier@redhat.com> Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp> Message-ID: <20260722112449.1386162-3-lvivier@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>

Laurent Vivier committed Jul 22, 2026 at 13:24 UTC 1e5efe6d93701d6b2b05b62822c02eee935490b5
1 file changed +2
hw/net/igb_core.c
+2
@@ -4548,5 +4548,7 @@ igb_core_post_load(IGBCore *core)
4548 igb_intrmgr_resume(core);
4549 igb_autoneg_resume(core);
4550
4551 + igb_calc_rxdesclen(core);
4552 +
4553 return 0;
4554 }