Skip to contentSkip to conversation

batman-adv: verify tt len does not exceed packet len

PATCH Applied Marek Lindner 2 participants 3 messages Mar 4, 2013 – Mar 9, 2013

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 batman-adv: verify tt len does not exceed packet len

---

v2:
- simplified approach of same check

 bat_iv_ogm.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
bat_iv_ogm.c +3 -3
index 7654b76..2ce7b28 100644
@@ -1297,7 +1297,8 @@ static int batadv_iv_ogm_receive(struct sk_buff *skb,
 	batadv_ogm_packet = (struct batadv_ogm_packet *)packet_buff;
 
 	/* unpack the aggregated packets and process them one by one */
-	do {
+	while (batadv_iv_ogm_aggr_packet(buff_pos, packet_len,
+					 batadv_ogm_packet->tt_num_changes)) {
 		tt_buff = packet_buff + buff_pos + BATADV_OGM_HLEN;
 
 		batadv_iv_ogm_process(ethhdr, batadv_ogm_packet, tt_buff,
@@ -1308,8 +1309,7 @@ static int batadv_iv_ogm_receive(struct sk_buff *skb,
 
 		packet_pos = packet_buff + buff_pos;
 		batadv_ogm_packet = (struct batadv_ogm_packet *)packet_pos;
-	} while (batadv_iv_ogm_aggr_packet(buff_pos, packet_len,
-					   batadv_ogm_packet->tt_num_changes));
+	}
 
 	kfree_skb(skb);
 	return NET_RX_SUCCESS;
Signature · 1 line
1.7.10.4
author Applied
#1 lore raw
Quoted 8 lines · On Monday, March 04, 2013 20:26:05 Marek Lindner wrote:

---

v2:
- simplified approach of same check

 bat_iv_ogm.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Applied in revision e56c79f.

@Antonio: This is stable-ware.

Regards,
Marek

#2 lore raw
Quoted 7 lines · Marek Lindner
Quoted 6 lines · On Monday, March 04, 2013 20:26:05 Marek Lindner wrote:

---

v2:
- simplified approach of same check

Quoted 6 lines
Quoted 2 lines
 bat_iv_ogm.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Applied in revision e56c79f.

@Antonio: This is stable-ware.

Yes, will take care of that.
Thanks,

Signature · 4 lines
Antonio Quartulli

..each of us alone is worth nothing..
Ernesto "Che" Guevara