batman-adv: Don't leak information through uninitialized packet fields
The reserved fields in batman-adv packets are not set to a constant value. The
content of these memory regions is leaked unintentionally to the network.
This regression was introduced in 3b27ffb00f
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
此提交包含在:
@@ -589,6 +589,7 @@ static int batadv_generate_vis_packet(struct batadv_priv *bat_priv)
|
||||
packet->header.ttl = BATADV_TTL;
|
||||
packet->seqno = htonl(ntohl(packet->seqno) + 1);
|
||||
packet->entries = 0;
|
||||
packet->reserved = 0;
|
||||
skb_trim(info->skb_packet, sizeof(*packet));
|
||||
|
||||
if (packet->vis_type == BATADV_VIS_TYPE_CLIENT_UPDATE) {
|
||||
@@ -890,6 +891,7 @@ int batadv_vis_init(struct batadv_priv *bat_priv)
|
||||
packet->header.packet_type = BATADV_VIS;
|
||||
packet->header.ttl = BATADV_TTL;
|
||||
packet->seqno = 0;
|
||||
packet->reserved = 0;
|
||||
packet->entries = 0;
|
||||
|
||||
INIT_LIST_HEAD(&bat_priv->vis_send_list);
|
||||
|
新增問題並參考
封鎖使用者