mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
batman-adv: initialize "struct batadv_tvlv_tt_vlan_data"->reserved field
commit 08c27f3322fec11950b8f1384aa0f3b11d028528 upstream. KMSAN found uninitialized value at batadv_tt_prepare_tvlv_local_data() [1], for commitced72933a5("batman-adv: use CRC32C instead of CRC16 in TT code") inserted 'reserved' field into "struct batadv_tvlv_tt_data" and commit7ea7b4a142("batman-adv: make the TT CRC logic VLAN specific") moved that field to "struct batadv_tvlv_tt_vlan_data" but left that field uninitialized. [1] https://syzkaller.appspot.com/bug?id=07f3e6dba96f0eb3cabab986adcd8a58b9bdbe9d Reported-by: syzbot <[email protected]> Tested-by: syzbot <[email protected]> Signed-off-by: Tetsuo Handa <[email protected]> Fixes:ced72933a5("batman-adv: use CRC32C instead of CRC16 in TT code") Fixes:7ea7b4a142("batman-adv: make the TT CRC logic VLAN specific") Acked-by: Sven Eckelmann <[email protected]> Signed-off-by: David S. Miller <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
79407ae347
commit
9de1caa110
1 changed files with 2 additions and 0 deletions
|
|
@ -891,6 +891,7 @@ batadv_tt_prepare_tvlv_global_data(struct batadv_orig_node *orig_node,
|
|||
hlist_for_each_entry_rcu(vlan, &orig_node->vlan_list, list) {
|
||||
tt_vlan->vid = htons(vlan->vid);
|
||||
tt_vlan->crc = htonl(vlan->tt.crc);
|
||||
tt_vlan->reserved = 0;
|
||||
|
||||
tt_vlan++;
|
||||
}
|
||||
|
|
@ -974,6 +975,7 @@ batadv_tt_prepare_tvlv_local_data(struct batadv_priv *bat_priv,
|
|||
|
||||
tt_vlan->vid = htons(vlan->vid);
|
||||
tt_vlan->crc = htonl(vlan->tt.crc);
|
||||
tt_vlan->reserved = 0;
|
||||
|
||||
tt_vlan++;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue