From: Andrew Stellman prp_fill_frame_info() looks for a Redundancy Control Trailer (RCT) at the end of every frame, including frames sent through the PRP master. If a UDP payload ends in bytes that look like an RCT, the frame goes out with no new RCT, with the payload's sequence number and the LAN ID written into the payload, and hsr->sequence_nr isn't advanced. Skip the RCT check for frames received on the master port. Frames sent through the master that already end in a valid RCT now get a second RCT instead of having theirs reused. Fixes: 451d8123f897 ("net: prp: add packet handling support") Signed-off-by: Andrew Stellman --- Tested on mainline 19cc08c1a6a6 (7.4.0-rc5) in arm64 QEMU with KASAN: a UDP payload with such a tail went out as a 106-byte frame with a changed payload before the fix, and as a 112-byte frame with the payload intact with it. Found with Quality Playbook (https://github.com/andrewstellman/quality-playbook) running Claude Opus 5.5; the fix was drafted with OpenAI GPT-6 (Codex). A reproducer is available on request. net/hsr/hsr_forward.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/hsr/hsr_forward.c b/net/hsr/hsr_forward.c index 44f6d9c83180..6cec0d36e9e8 100644 --- a/net/hsr/hsr_forward.c +++ b/net/hsr/hsr_forward.c @@ -682,7 +682,8 @@ int prp_fill_frame_info(__be16 proto, struct sk_buff *skb, /* Supervision frame */ struct prp_rct *rct = skb_get_PRP_rct(skb); - if (rct && + /* Host frames have no RCT yet, even if their payload looks like one. */ + if (rct && frame->port_rcv->type != HSR_PT_MASTER && prp_check_lsdu_size(skb, rct, frame->is_supervision)) { frame->skb_hsr = NULL; frame->skb_std = NULL; -- 2.53.0