Skip to content

Fix skb data corruption on broadcast across multiple interfaces#22

Open
TrevorGibson-SR wants to merge 1 commit into
microchip-ung:bsp-6.18-2026from
SchillingRobotics:fix/vtss-if-mux-skb-cow-head
Open

Fix skb data corruption on broadcast across multiple interfaces#22
TrevorGibson-SR wants to merge 1 commit into
microchip-ung:bsp-6.18-2026from
SchillingRobotics:fix/vtss-if-mux-skb-cow-head

Conversation

@TrevorGibson-SR
Copy link
Copy Markdown

I encountered this bug when attempting to send broadcast traffic on multiple vtss.vlan.x interfaces simultaneously.

The current driver implementation modifies the socket buffer when adding the IFH and VLAN tags. This method works fine when there's only one interface using the buffer, but breaks when shared across two or more interfaces (in my case, using a bridge interface to send out broadcast traffic on multiple vtss.vlan.x interfaces). The data in the socket buffer becomes corrupted for any subsequent calls to internal_dev_xmit() and prevents the packets from being delivered or responded to correctly.

The fix is to use skb_cow_head() to both ensure sufficient headroom and copy the buffer before pushing IFH and VLAN tags into it, instead of checking against and modifying the original buffer.

Replace the skb_headroom() check with skb_cow_head(), which both ensures sufficient headroom and copies the shared data buffer into a private one when the skb is cloned
@Danielmachon
Copy link
Copy Markdown
Member

Thanks for reporting this!

I see the issue, and the fix looks correct.

The fix will be merged through our BSP, and available in the next 06 release.

Thanks.

@Danielmachon Danielmachon self-assigned this Apr 30, 2026
@TrevorGibson-SR
Copy link
Copy Markdown
Author

Happy to help, thanks for integrating this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants