In mrp_pdu_parse_vecattr(), vector attribute events are encoded three per byte and valen tracks the number of events left to process. The parser decrements valen after processing the first and second events from each event byte, but not after processing the third one. When valen is exactly a multiple of three, the loop continues after the last valid event and consumes the next byte as a new event byte. This can make the parser apply a spurious event to the current vector attribute and update the MRP applicant state with an event that was not part of the VectorAttribute. For example, a VectorAttribute with valen=3 and events JOIN_IN, JOIN_IN, LV can be followed by another byte whose first encoded event is then incorrectly applied to the third attribute. Decrement valen after processing the third event as well. Fixes: febf018d2234 ("net/802: Implement Multiple Registration Protocol (MRP)") Reported-by: Yizhou Zhao Reported-by: Yuxiang Yang Reported-by: Ao Wang Reported-by: Xuewei Feng Reported-by: Qi Li Reported-by: Ke Xu Assisted-by: GLM:GLM-5.1 Signed-off-by: Yizhou Zhao --- diff --git a/net/802/mrp.c b/net/802/mrp.c index ff0e805..40cb941 100644 --- a/net/802/mrp.c +++ b/net/802/mrp.c @@ -753,6 +753,7 @@ static int mrp_pdu_parse_vecattr(struct mrp_applicant *app, vaevents %= __MRP_VECATTR_EVENT_MAX; vaevent = vaevents; mrp_pdu_parse_vecattr_event(app, skb, vaevent); + valen--; } return 0; } -- 2.43.0