Commit 8038806
batman-adv: Remove uninitialized data in full table TT response
The number of entries filled by batadv_tt_tvlv_generate() can be less
than initially expected in batadv_tt_prepare_tvlv_{global,local}_data()
(changes can be removed by batadv_tt_local_event() in ADD+DEL sequence
in the meantime as the lock held during the whole tvlv global/local data
generation).
Thus tvlv_len could be bigger than the actual TT entry size that need
to be sent so full table TT_RESPONSE could hold invalid TT entries such
as below.
* 00:00:00:00:00:00 -1 [....] ( 0) 88:12:4e:ad:7e:ba (179) (0x45845380)
* 00:00:00:00:78:79 4092 [.W..] ( 0) 88:12:4e:ad:7e:3c (145) (0x8ebadb8b)
Remove the extra allocated space to avoid sending uninitialized entries
for full table TT_RESPONSE in both batadv_send_other_tt_response() and
batadv_send_my_tt_response().
Fixes: 7ea7b4a ("batman-adv: make the TT CRC logic VLAN specific")
Signed-off-by: Remi Pommarel <[email protected]>
Signed-off-by: Sven Eckelmann <[email protected]>
Signed-off-by: Simon Wunderlich <[email protected]>1 parent f2f7358 commit 8038806
1 file changed
+22
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2712 | 2712 | | |
2713 | 2713 | | |
2714 | 2714 | | |
| 2715 | + | |
| 2716 | + | |
2715 | 2717 | | |
2716 | | - | |
2717 | | - | |
2718 | | - | |
2719 | | - | |
2720 | | - | |
2721 | | - | |
2722 | | - | |
| 2718 | + | |
| 2719 | + | |
| 2720 | + | |
| 2721 | + | |
| 2722 | + | |
| 2723 | + | |
| 2724 | + | |
2723 | 2725 | | |
2724 | 2726 | | |
2725 | 2727 | | |
| |||
2733 | 2735 | | |
2734 | 2736 | | |
2735 | 2737 | | |
2736 | | - | |
| 2738 | + | |
2737 | 2739 | | |
2738 | 2740 | | |
2739 | 2741 | | |
| |||
2759 | 2761 | | |
2760 | 2762 | | |
2761 | 2763 | | |
| 2764 | + | |
| 2765 | + | |
2762 | 2766 | | |
2763 | 2767 | | |
2764 | 2768 | | |
| |||
3029 | 3033 | | |
3030 | 3034 | | |
3031 | 3035 | | |
3032 | | - | |
3033 | | - | |
3034 | | - | |
3035 | | - | |
| 3036 | + | |
| 3037 | + | |
| 3038 | + | |
| 3039 | + | |
| 3040 | + | |
3036 | 3041 | | |
3037 | 3042 | | |
3038 | 3043 | | |
| |||
3156 | 3161 | | |
3157 | 3162 | | |
3158 | 3163 | | |
3159 | | - | |
3160 | | - | |
3161 | | - | |
| 3164 | + | |
| 3165 | + | |
| 3166 | + | |
| 3167 | + | |
| 3168 | + | |
3162 | 3169 | | |
3163 | 3170 | | |
3164 | 3171 | | |
| |||
0 commit comments